]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Keep the ARP state open on announce so we can detect duplicates.
authorRoy Marples <roy@marples.name>
Fri, 29 Apr 2016 22:41:51 +0000 (22:41 +0000)
committerRoy Marples <roy@marples.name>
Fri, 29 Apr 2016 22:41:51 +0000 (22:41 +0000)
arp.c
dhcp.c

diff --git a/arp.c b/arp.c
index 49d392dbb19d15c5baeb2bdd5f094425d1f25650..5dec96b29e5b726bdc572ab5b8ee077bafaba5df 100644 (file)
--- 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 582feada582d89c05fa73a7c716fef32e85ab481..d2a9678a3825882ac179e69b1bc78ae108ebd24e 100644 (file)
--- 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);
                }