summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2013-11-13 08:27:25 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2013-11-13 08:27:25 +0000
commita25f8f69ad947dc4263580da60934aedead78dbf (patch)
tree752f01629ea1e9e2415c16d2ce5c4ab506f59ef4 /sys/netinet6
parent4c8a3a66c1ebd8db14e53061050e486f83df0004 (diff)
In in6_update_ifa(), don't set the TENTATIVE flag on an IPv6 address that
is marked as NODAD. Since we're not gonna do duplicate address detection for this address, the TENTATIVE flag won't get cleared, rendering the address unusable. The existing logic only checked whether DAD was enabled for the interface, but DAD can be configured on a per-address basis. ok sthen@ as part of a larger diff
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index d4f76a8301a..c9a3255fad6 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.123 2013/11/11 09:15:35 mpi Exp $ */
+/* $OpenBSD: in6.c,v 1.124 2013/11/13 08:27:24 stsp Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -991,7 +991,8 @@ 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))
+ if (hostIsNew && in6if_do_dad(ifp) &&
+ (ifra->ifra_flags & IN6_IFF_NODAD) == 0)
ia->ia6_flags |= IN6_IFF_TENTATIVE;
/*