]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If we get DAD using IPv4LL on NetBSD, delete the address.
authorRoy Marples <roy@marples.name>
Fri, 10 Mar 2017 16:11:24 +0000 (16:11 +0000)
committerRoy Marples <roy@marples.name>
Fri, 10 Mar 2017 16:11:24 +0000 (16:11 +0000)
ipv4ll.c

index 0877ce731380988f5d98c172d356bea8df687d7d..828c919041baa28188ce13310eff4660a4e25ab7 100644 (file)
--- a/ipv4ll.c
+++ b/ipv4ll.c
@@ -244,6 +244,9 @@ ipv4ll_conflicted(struct arp_state *astate, const struct arp_msg *amsg)
 {
        struct interface *ifp;
        struct ipv4ll_state *state;
+#ifdef IN_IFF_DUPLICATED
+       struct ipv4_addr *ia;
+#endif
 
        assert(astate != NULL);
        assert(astate->iface != NULL);
@@ -309,6 +312,12 @@ ipv4ll_conflicted(struct arp_state *astate, const struct arp_msg *amsg)
                script_runreason(ifp, "IPV4LL");
        }
 
+#ifdef IN_IFF_DUPLICATED
+       ia = ipv4_iffindaddr(ifp, &astate->addr, NULL);
+       if (ia != NULL && ia->addr_flags & IN_IFF_DUPLICATED)
+               ipv4_deladdr(ia, 1);
+#endif
+
        arp_cancel(astate);
        if (++state->conflicts == MAX_CONFLICTS)
                logger(ifp->ctx, LOG_ERR,