Author: markj
Date: Sat Oct  1 01:30:34 2016
New Revision: 306548
URL: https://svnweb.freebsd.org/changeset/base/306548

Log:
  nd6_dad_timer(): don't assert that the address is tentative.
  
  It appears that this assertion can be tripped in some cases when
  multiple interfaces are on the same link. Until this is resolved, revert a
  part of r306305 and simply log a message if the DAD timer fires on a
  non-tentative address.
  
  Reported by:  jhb
  X-MFC With:   r306305

Modified:
  head/sys/netinet6/nd6_nbr.c

Modified: head/sys/netinet6/nd6_nbr.c
==============================================================================
--- head/sys/netinet6/nd6_nbr.c Sat Oct  1 01:24:24 2016        (r306547)
+++ head/sys/netinet6/nd6_nbr.c Sat Oct  1 01:30:34 2016        (r306548)
@@ -1316,8 +1316,6 @@ nd6_dad_timer(struct dadq *dp)
        char ip6buf[INET6_ADDRSTRLEN];
 
        KASSERT(ia != NULL, ("DAD entry %p with no address", dp));
-       KASSERT((ia->ia6_flags & IN6_IFF_TENTATIVE) != 0,
-           ("DAD entry %p for non-tentative address", dp));
 
        if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) {
                /* Do not need DAD for ifdisabled interface. */
@@ -1332,6 +1330,13 @@ nd6_dad_timer(struct dadq *dp)
                        ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
                goto err;
        }
+       if ((ia->ia6_flags & IN6_IFF_TENTATIVE) == 0) {
+               log(LOG_ERR, "nd6_dad_timer: called with non-tentative address "
+                       "%s(%s)\n",
+                       ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr),
+                       ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???");
+               goto err;
+       }
 
        /* Stop DAD if the interface is down even after dad_maxtry attempts. */
        if ((dp->dad_ns_tcount > V_dad_maxtry) &&
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to