From ef8978bb9ee31c6f344772e513375b73a25b609c Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 1 Oct 2019 18:41:15 +0100 Subject: [PATCH] IPv4LL: Ensure we pick another address on DAD conflict via ARP While here correct an error diagnostic logging an system error too. --- src/ipv4ll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.47.2