From 1fce58fc626d20b265b1198c994c4c027bd4f603 Mon Sep 17 00:00:00 2001 From: Hiroki Sato Date: Thu, 10 Sep 2015 06:10:30 +0000 Subject: [PATCH] Do not add IN6_IFF_TENTATIVE when ND6_IFF_NO_DAD. MFC after: 3 days --- sys/netinet6/in6.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 37ef5f41a2e4..3b9590600d80 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -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 */