Do not add IN6_IFF_TENTATIVE when ND6_IFF_NO_DAD.

MFC after:	3 days
This commit is contained in:
Hiroki Sato 2015-09-10 06:10:30 +00:00
parent 3ba7e4ce9c
commit 1fce58fc62

View File

@ -1198,11 +1198,13 @@ in6_update_ifa_internal(struct ifnet *ifp, struct in6_aliasreq *ifra,
* 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 */