]> git.baikalelectronics.ru Git - kernel.git/commit
[IPV4]: ipconfig.c: fix dhcp timeout behaviour
authorMaxime Bizon <mbizon@freebox.fr>
Tue, 28 Jun 2005 20:21:12 +0000 (13:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Jun 2005 20:21:12 +0000 (13:21 -0700)
commit4ee017f077d7b20f87cb18ef465ea5cee2865959
tree30f61b21c9e80d22f59f76bc1224a42e6fc0fa4a
parent8aa5156f0557f95e6d25546da47a6d7fc6dd033c
[IPV4]: ipconfig.c: fix dhcp timeout behaviour

I think there is a small bug in ipconfig.c in case IPCONFIG_DHCP is set
and dhcp is used.

When a DHCPOFFER is received, ip address is kept until we get DHCPACK.
If no ack is received, ic_dynamic() returns negatively, but leaves the
offered ip address in ic_myaddr.

This makes the main loop in ip_auto_config() break and uses the maybe
incomplete configuration.

Not sure if it's the best way to do, but the following trivial patch
correct this.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipconfig.c