Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Clear IN6_IFF_DUPLICATED when link goes down or...
details: https://anonhg.NetBSD.org/src/rev/71e3e4149f14
branches: trunk
changeset: 803566:71e3e4149f14
user: roy <roy%NetBSD.org@localhost>
date: Mon Nov 03 13:04:12 2014 +0000
description:
Clear IN6_IFF_DUPLICATED when link goes down or up.
diffstat:
sys/netinet6/in6.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (47 lines):
diff -r ecb0cce97a94 -r 71e3e4149f14 sys/netinet6/in6.c
--- a/sys/netinet6/in6.c Sun Nov 02 23:56:13 2014 +0000
+++ b/sys/netinet6/in6.c Mon Nov 03 13:04:12 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6.c,v 1.178 2014/10/27 14:10:12 christos Exp $ */
+/* $NetBSD: in6.c,v 1.179 2014/11/03 13:04:12 roy Exp $ */
/* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.178 2014/10/27 14:10:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.179 2014/11/03 13:04:12 roy Exp $");
#include "opt_inet.h"
#include "opt_compat_netbsd.h"
@@ -2167,6 +2167,10 @@
if (ia->ia6_flags & IN6_IFF_TENTATIVE) {
int rand_delay;
+
+ /* Clear the duplicated flag as we're starting DAD. */
+ ia->ia6_flags &= ~IN6_IFF_DUPLICATED;
+
/*
* The TENTATIVE flag was likely set by hand
* beforehand, implicitly indicating the need for DAD.
@@ -2196,6 +2200,7 @@
/* interface may not support link state, so bring it up also */
in6_if_link_up(ifp);
}
+
/*
* Mark all addresses as detached.
*/
@@ -2229,7 +2234,8 @@
"%s marked detached\n",
ip6_sprintf(&ia->ia_addr.sin6_addr)));
ia->ia6_flags |= IN6_IFF_DETACHED;
- ia->ia6_flags &= ~IN6_IFF_TENTATIVE;
+ ia->ia6_flags &=
+ ~(IN6_IFF_TENTATIVE | IN6_IFF_DUPLICATED);
nd6_newaddrmsg(ifa);
}
}
Home |
Main Index |
Thread Index |
Old Index