Author: hrs
Date: Thu Sep 10 06:10:30 2015
New Revision: 287609
URL: https://svnweb.freebsd.org/changeset/base/287609

Log:
  Do not add IN6_IFF_TENTATIVE when ND6_IFF_NO_DAD.
  
  MFC after:    3 days

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c     Thu Sep 10 06:08:42 2015        (r287608)
+++ head/sys/netinet6/in6.c     Thu Sep 10 06:10:30 2015        (r287609)
@@ -1198,11 +1198,13 @@ in6_update_ifa_internal(struct ifnet *if
         * source address.
         */
        ia->ia6_flags &= ~IN6_IFF_DUPLICATED;   /* safety */
-       if (hostIsNew && in6if_do_dad(ifp))
-               ia->ia6_flags |= IN6_IFF_TENTATIVE;
 
-       /* DAD should be performed after ND6_IFF_IFDISABLED is cleared. */
-       if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)
+       /*
+        * DAD should be performed for an new address or addresses on
+        * an interface with ND6_IFF_IFDISABLED.
+        */
+       if (in6if_do_dad(ifp) &&
+           (hostIsNew || (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)))
                ia->ia6_flags |= IN6_IFF_TENTATIVE;
 
        /* notify other subsystems */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to