]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipconfig: Support using "delayed" DHCP replies
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 29 Jul 2016 09:30:38 +0000 (11:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Aug 2016 22:40:05 +0000 (15:40 -0700)
commit381cb4518d2a20e71a92be89bac5681600e5332a
tree513984413bf7399b9519348c3564f781bc30179e
parent73343689c7e48a060c806020be3ba4adc662b105
net: ipconfig: Support using "delayed" DHCP replies

The dhcp code only waits 1s between sending DHCP requests on different
devices and only accepts an answer for the device that sent out the last
request. Only the timeout at the end of a loop is increased iteratively
which favours only the last device. This makes it impossible to work
with a dhcp server that takes little more than 1s connected to a device
that is not the last one.

Instead of also increasing the inter-device timeout, teach the code to
handle delayed replies.

To accomplish that, make *ic_dev track the current ic_device instead of
the current net_device and adapt all users accordingly. The relevant
change then is to reset d to ic_dev on a reply to assert that the
followup request goes through the right device.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipconfig.c