From: Roy Marples Date: Tue, 1 Oct 2019 17:41:15 +0000 (+0100) Subject: IPv4LL: Ensure we pick another address on DAD conflict via ARP X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cacab0cc439055b41b0ced97d75ab78318296211;p=thirdparty%2Fdhcpcd.git IPv4LL: Ensure we pick another address on DAD conflict via ARP While here correct an error diagnostic logging an system error too. --- diff --git a/src/ipv4ll.c b/src/ipv4ll.c index 4b0038b7..f8937189 100644 --- a/src/ipv4ll.c +++ b/src/ipv4ll.c @@ -263,7 +263,7 @@ ipv4ll_found(struct interface *ifp) arp_cancel(state->arp); if (++state->conflicts == MAX_CONFLICTS) - logerr("%s: failed to acquire an IPv4LL address", + logerrx("%s: failed to acquire an IPv4LL address", ifp->name); eloop_timeout_add_sec(ifp->ctx->eloop, state->conflicts >= MAX_CONFLICTS ? @@ -308,6 +308,7 @@ ipv4ll_found_arp(struct arp_state *astate, __unused const struct arp_msg *amsg) struct ipv4ll_state *state = IPV4LL_STATE(ifp); assert(state->arp == astate); + state->pickedaddr.s_addr = INADDR_ANY; ipv4ll_found(ifp); }