summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-09-18 19:55:02 +0000
committerRoy Marples <roy@marples.name>2009-09-18 19:55:02 +0000
commit40f55c9d0e7bb21d721b1694e0c38e6946a2b6ee (patch)
treecd82bacb5ce760451358c33dcf2b07e129fe544c
parent92e2f21374f0b34c6ae6b4117539d3b1cd05f437 (diff)
downloaddhcpcd-40f55c9d0e7bb21d721b1694e0c38e6946a2b6ee.tar.xz
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.
-rw-r--r--client.c2
1 files changed, 1 insertions, 1 deletions
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))