From: Roy Marples Date: Fri, 29 Apr 2016 22:41:51 +0000 (+0000) Subject: Keep the ARP state open on announce so we can detect duplicates. X-Git-Tag: v6.11.0~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f39df4acb43275ffa8b68ef7906a3a5c241a52e;p=thirdparty%2Fdhcpcd.git Keep the ARP state open on announce so we can detect duplicates. --- diff --git a/arp.c b/arp.c index 49d392db..5dec96b2 100644 --- a/arp.c +++ b/arp.c @@ -215,8 +215,7 @@ arp_announced(void *arg) return; } - /* Nothing more to do, so free us */ - arp_free(astate); + /* Keep ARP open so we can detect duplicates. */ } static void diff --git a/dhcp.c b/dhcp.c index 582feada..d2a9678a 100644 --- a/dhcp.c +++ b/dhcp.c @@ -1863,13 +1863,6 @@ dhcp_renew(struct interface *ifp) dhcp_startrenew(ifp); } -static void -dhcp_arp_announced(struct arp_state *astate) -{ - - arp_close(astate->iface); -} - static void dhcp_rebind(void *arg) { @@ -2188,7 +2181,6 @@ dhcp_arp_address(struct interface *ifp) if ((astate = arp_new(ifp, &addr)) != NULL) { astate->probed_cb = dhcp_arp_probed; astate->conflicted_cb = dhcp_arp_conflicted; - astate->announced_cb = dhcp_arp_announced; } if (ia == NULL) { struct dhcp_lease l; @@ -2211,7 +2203,6 @@ dhcp_arp_address(struct interface *ifp) if ((astate = arp_new(ifp, &addr)) != NULL) { astate->probed_cb = dhcp_arp_probed; astate->conflicted_cb = dhcp_arp_conflicted; - astate->announced_cb = dhcp_arp_announced; /* We need to handle DAD. */ arp_probe(astate); }