aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2015-09-13 01:44:30 +0000
committerHiroki Sato <hrs@FreeBSD.org>2015-09-13 01:44:30 +0000
commitaa0f5a8caff0acbbd12fc4a02e39c4eb40fafd81 (patch)
tree2d1ef6b25718160afa249a7892ad6bca60e102c2
parent9e8d1024e8ef46dbc577199f5ab8e6f5b37f67fb (diff)
Notes
-rw-r--r--sys/netinet6/in6.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 4c94ba8e8b15..432b08a34564 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1254,11 +1254,13 @@ in6_update_ifa(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;
/*