Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jun 2018 16:38:12 +0000
From:      Viktor Dukhovni <freebsd@dukhovni.org>
To:        freebsd-net@freebsd.org
Subject:   Re: [PATCH]: The 6to4 stf0 interface flapping in/out of tentative in FreeBSD 11
Message-ID:  <20180622163812.GA17559@mournblade.imrryr.org>
In-Reply-To: <20171106042248.GL3322@mournblade.imrryr.org>
References:  <CEBB4E6F-4D5F-491F-8C81-C9F81325078B@dukhovni.org> <20171106042248.GL3322@mournblade.imrryr.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 06, 2017 at 04:22:48AM +0000, Viktor Dukhovni wrote:

> Today, I looked closely at the kernel sources and found the issue.
> Patch below.  Interfaces found to not have IFF_DRV_RUNNING in
> if_drv_flags by the periodic interface scan are marked tentative.
> Since the "stf" driver did not set that flag, the "stf" interface
> flaps.
> 
> Index: sys/net/if_stf.c
> ===================================================================
> --- sys/net/if_stf.c	(revision 325169)
> +++ sys/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:

I just upgraded to 11.1-p10, forgetting I had patched my kernel,
and the stf0 interface flapping was back, with IPv6 connectivity
disappearing every other second or so (interface shows as "tentative"
and outgoing connections fail with "can't assign requested address").

Appied the same patch and rebooted, and the problem is gone.  Here's
the patch again:

Index: sys/net/if_stf.c
--- sys/net/if_stf.c	(revision 333375)
+++ sys/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:

$ svn info
Path: .
Working Copy Root Path: /usr/src
URL: https://svn0.us-west.freebsd.org/base/releng/11.1
Relative URL: ^/releng/11.1
Repository Root: https://svn0.us-west.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 333375
Node Kind: directory
Schedule: normal
Last Changed Author: gordon
Last Changed Rev: 333375
Last Changed Date: 2018-05-08 13:18:24 -0400 (Tue, 08 May 2018)

-- 
	VIktor.



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