From: Roy Marples Date: Fri, 17 Mar 2017 17:38:42 +0000 (+0000) Subject: If the kernel isn't doing DAD for our newly added address, let it pass so we can... X-Git-Tag: v7.0.0-beta1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2ced8364da244926a2b8f80a99813bdfe63ec30;p=thirdparty%2Fdhcpcd.git If the kernel isn't doing DAD for our newly added address, let it pass so we can mark it as DAD complete. --- diff --git a/src/if-bsd.c b/src/if-bsd.c index 97674083..cad721d5 100644 --- a/src/if-bsd.c +++ b/src/if-bsd.c @@ -958,8 +958,15 @@ if_ifa(struct dhcpcd_ctx *ctx, const struct ifa_msghdr *ifam) int addrflags; #ifdef HAVE_IFAM_PID - if (if_ownmsgpid(ctx, ifam->ifam_pid, 0)) - return; + if (if_ownmsgpid(ctx, ifam->ifam_pid, 0)) { +#ifdef HAVE_IFAM_ADDRFLAGS + /* If the kernel isn't doing DAD for the newly added + * address we need to let it through. */ + if (ifam->ifam_type != RTM_NEWADDR || + ifam->ifam_addrflags & IN_IFF_TENTATIVE) +#endif + return; + } #endif if ((ifp = if_findindex(ctx->ifaces, ifam->ifam_index)) == NULL)