* [PATCH] ipconfig.c: fix dhcp timeout leading to bad requested address.
@ 2005-10-19 19:43 Maxime Bizon
0 siblings, 0 replies; only message in thread
From: Maxime Bizon @ 2005-10-19 19:43 UTC (permalink / raw)
To: davem; +Cc: netdev
Hello,
There is still a little bug in dhcp timeout handling.
When DHCPOFFER is received, offered and server addresses are kept. If no
ack is received, ic_myaddr is reset to INADDR_NONE, but not ic_servaddr.
The problem is that ic_dhcp_init_options() checks only ic_servaddr to
known if it has to send a DHCPOFFER or a DHCPREQUEST. So packets sent
after a timeout will be DHCPREQUEST with requested address INADDR_NONE.
If the the dhcp server does not NAK it, this request is done forever.
The following patch fixes this.
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
--- linux-2.6.13.4/net/ipv4/ipconfig.c.orig 2005-10-18 18:11:54.000000000 +0200
+++ linux-2.6.13.4/net/ipv4/ipconfig.c 2005-10-19 20:44:07.000000000 +0200
@@ -1151,6 +1151,7 @@
if (!ic_got_reply) {
ic_myaddr = INADDR_NONE;
+ ic_servaddr = INADDR_NONE;
return -1;
}
--
Maxime
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-19 19:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-19 19:43 [PATCH] ipconfig.c: fix dhcp timeout leading to bad requested address Maxime Bizon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox