From owner-freebsd-net@freebsd.org Sun Nov 25 19:24:49 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AD9E113F41A for ; Sun, 25 Nov 2018 19:24:49 +0000 (UTC) (envelope-from ietf-dane@dukhovni.org) Received: from straasha.imrryr.org (straasha.imrryr.org [100.2.39.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 852CC73A1B for ; Sun, 25 Nov 2018 19:24:48 +0000 (UTC) (envelope-from ietf-dane@dukhovni.org) Received: by straasha.imrryr.org (Postfix, from userid 1001) id 4EAC0461BA; Sun, 25 Nov 2018 14:24:47 -0500 (EST) Date: Sun, 25 Nov 2018 14:24:47 -0500 From: Viktor Dukhovni To: freebsd-net@freebsd.org Subject: stf flapping in/out of "tentative": patches for 11.2 Message-ID: <20181125192447.GU4122@straasha.imrryr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 852CC73A1B X-Spamd-Result: default: False [-2.89 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.930,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:100.2.39.101]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dukhovni.org]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.90)[-0.905,0]; IP_SCORE(-0.21)[asn: 701(-0.95), country: US(-0.09)]; RCVD_IN_DNSWL_MED(-0.20)[101.39.2.100.list.dnswl.org : 127.0.6.2]; MX_GOOD(-0.01)[smtp.dukhovni.org]; NEURAL_HAM_SHORT(-0.34)[-0.342,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:701, ipnet:100.2.0.0/16, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2018 19:24:49 -0000 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; }