]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If the kernel isn't doing DAD for our newly added address, let it pass so we can...
authorRoy Marples <roy@marples.name>
Fri, 17 Mar 2017 17:38:42 +0000 (17:38 +0000)
committerRoy Marples <roy@marples.name>
Fri, 17 Mar 2017 17:38:42 +0000 (17:38 +0000)
src/if-bsd.c

index 97674083c90843dd8a469aed7bd54fa24b131a99..cad721d5d5f547f800b38d28be30b2e198c6a9d6 100644 (file)
@@ -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)