Hi Jan,
the problem you are describing is the subject of http://trac.helenos.org/
ticket/626
the problem is in udp/sockets which currently cannot handle two DHCP
associations being bound to the same port albeit on two different
interfaces. Your patch just works around that problem. You could also
probably get DHCP failure on one of the links and it might only succeed on
another attempt (since the links are configured in parallel, at least I
think so).
DHCP is supposed to keep the transport open all the time, since it needs to
monitor link state and renew the lease after some time - not implemented
yet.
I am currently working towards fixing ticket 626. But since the problem is
partly in the sockets implementation, which is 'legacy' code, I started by
doing a cleanup of that area (see https://code.launchpad.net/~jsvoboda/
helenos/nettlapi). It will still take me some time to finish that (2-3
weeks? depending on how much time I can spare). I will address 626 as part
of that work.
I improved your patch so that the finalization of the transport is correctly
acted upon (so no error message is printed) and commited to mainline.
Hopefully it can help you until the time I can implement the proper
solution.
Cheers,
Jiri
---------- Původní zpráva ----------
Od: Jan Buchar <[email protected]>
Komu: HelenOS development mailing list <[email protected]>
Datum: 29. 4. 2015 14:25:46
Předmět: [HelenOS-devel] DHCP on multiple interfaces
"Greetings,
while working on my bachelor's thesis (HelenOS packet filter), I noticed
that
on a machine with two NICs DHCP fails to configure the second one. I found
that this is caused by dhcp_transport_fini() not being called after
finishing
negotiation. Because the address is still in use, the second negotiation
fails
to bind the address.
I attached a patch for this. However, this causes dhcp_recv_msg() to end
with
an error, because the socket it wants to read from is closed. The
configuration seems to work fine, though. Is there a better place for the
dhcp_transport_fini()? Or should I fix this some other way?
JB_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel"
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel