From: Roy Marples Date: Fri, 10 Mar 2017 16:11:24 +0000 (+0000) Subject: If we get DAD using IPv4LL on NetBSD, delete the address. X-Git-Tag: v7.0.0-beta1~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43b0c7fea1a778739601f4428d4eee1278e66b90;p=thirdparty%2Fdhcpcd.git If we get DAD using IPv4LL on NetBSD, delete the address. --- diff --git a/ipv4ll.c b/ipv4ll.c index 0877ce73..828c9190 100644 --- 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,