From: Roy Marples Date: Fri, 18 Sep 2009 19:55:02 +0000 (+0000) Subject: When we get an ACK we should close DHCP sockets so we don't handle any NAKs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40f55c9d0e7bb21d721b1694e0c38e6946a2b6ee;p=thirdparty%2Fdhcpcd.git 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. --- diff --git a/client.c b/client.c index 55d7c8b9..90657b33 100644 --- a/client.c +++ b/client.c @@ -1500,6 +1500,7 @@ handle_dhcp(struct if_state *state, struct dhcp_message **dhcpp, } lease->frominfo = 0; + do_socket(state, SOCKET_CLOSED); if (state->options & DHCPCD_ARP && iface->addr.s_addr != state->offer->yiaddr) { @@ -1516,7 +1517,6 @@ handle_dhcp(struct if_state *state, struct dhcp_message **dhcpp, } } - do_socket(state, SOCKET_CLOSED); r = bind_dhcp(state, options); if (!(state->options & DHCPCD_ARP)) { if (!(state->options & DHCPCD_INFORM))