changeset 1416:cb3ad433f3c1 draft dhcpcd-4

When we get an ACK we should close DHCP sockets so we don't handle any NAKs during ARP testing. This is important as some broken DHCP servers NAK immediately after an ACK in some situations.
author Roy Marples <roy@marples.name>
date Fri, 18 Sep 2009 19:55:02 +0000
parents e3d22331d8af
children 09125f5f5e5b
files client.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client.c	Tue Jul 28 19:56:00 2009 +0000
+++ b/client.c	Fri Sep 18 19:55:02 2009 +0000
@@ -1500,6 +1500,7 @@
 	}
 
 	lease->frominfo = 0;
+	do_socket(state, SOCKET_CLOSED);
 	if (state->options & DHCPCD_ARP &&
 	    iface->addr.s_addr != state->offer->yiaddr)
 	{
@@ -1516,7 +1517,6 @@
 		}
 	}
 
-	do_socket(state, SOCKET_CLOSED);
 	r = bind_dhcp(state, options);
 	if (!(state->options & DHCPCD_ARP)) {
 		if (!(state->options & DHCPCD_INFORM))