Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Nov 2018 14:24:47 -0500
From:      Viktor Dukhovni <ietf-dane@dukhovni.org>
To:        freebsd-net@freebsd.org
Subject:   stf flapping in/out of "tentative": patches for 11.2
Message-ID:  <20181125192447.GU4122@straasha.imrryr.org>

next in thread | raw e-mail | index | archive | help

Not sure what's required to get these adopted upstream.  My stf0
interface was still flapping in/out of "tentative" with 11.2, so
I applied essentially the same patches as for 11.1.

-- 
	Viktor.

Index: net/if_stf.c
===================================================================
--- net/if_stf.c	(revision 339356)
+++ net/if_stf.c	(working copy)
@@ -722,6 +722,7 @@
 		}
 
 		ifp->if_flags |= IFF_UP;
+		ifp->if_drv_flags |= IFF_DRV_RUNNING;
 		break;
 
 	case SIOCADDMULTI:
Index: netinet6/in6_ifattach.c
===================================================================
--- netinet6/in6_ifattach.c	(revision 339356)
+++ netinet6/in6_ifattach.c	(working copy)
@@ -704,6 +704,7 @@
 		 * it is rather harmful to have one.
 		 */
 		ND_IFINFO(ifp)->flags &= ~ND6_IFF_AUTO_LINKLOCAL;
+		ND_IFINFO(ifp)->flags |= ND6_IFF_NO_DAD;
 		break;
 	default:
 		break;
Index: netinet6/nd6.c
===================================================================
--- netinet6/nd6.c	(revision 339356)
+++ netinet6/nd6.c	(working copy)
@@ -1007,11 +1007,12 @@
 			 * Check status of the interface.  If it is down,
 			 * mark the address as tentative for future DAD.
 			 */
-			if ((ia6->ia_ifp->if_flags & IFF_UP) == 0 ||
-			    (ia6->ia_ifp->if_drv_flags & IFF_DRV_RUNNING)
-				== 0 ||
-			    (ND_IFINFO(ia6->ia_ifp)->flags &
-				ND6_IFF_IFDISABLED) != 0) {
+			if ((ND_IFINFO(ia6->ia_ifp)->flags & ND6_IFF_NO_DAD) == 0 &&
+			    ((ia6->ia_ifp->if_flags & IFF_UP) == 0 ||
+			     (ia6->ia_ifp->if_drv_flags & IFF_DRV_RUNNING)
+				 == 0 ||
+			     (ND_IFINFO(ia6->ia_ifp)->flags &
+				 ND6_IFF_IFDISABLED) != 0)) {
 				ia6->ia6_flags &= ~IN6_IFF_DUPLICATED;
 				ia6->ia6_flags |= IN6_IFF_TENTATIVE;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181125192447.GU4122>