Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Aug 2006 08:56:50 -0500
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Yar Tikhiy <yar@comp.chem.msu.su>
Cc:        drl@MyBSD.org.my, freebsd-stable@freebsd.org, Stefan Bethke <stb@lassitu.de>, Andrew Thompson <thompsa@freebsd.org>
Subject:   Re: Default route (IPv4) demolished by destroying clone (gif/gre) interface
Message-ID:  <20060817135650.GA89359@lor.one-eyed-alien.net>
In-Reply-To: <20060817071651.GB94460@comp.chem.msu.su>
References:  <20060815040736.2f85f090.drl@MyBSD.org.my> <9405D801-3435-419A-9541-E1A9B2CF26D2@lassitu.de> <20060816081130.GB81271@comp.chem.msu.su> <FED9705F-B445-4495-B90F-A656AAA966EE@lassitu.de> <20060816145419.GB62485@lor.one-eyed-alien.net> <20060816155844.GA85503@comp.chem.msu.su> <20060816171524.GA63928@lor.one-eyed-alien.net> <20060816204927.GA73369@heff.fud.org.nz> <20060816205913.GA69877@lor.one-eyed-alien.net> <20060817071651.GB94460@comp.chem.msu.su>

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

--ZGiS0Q5IWpPtfppv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Aug 17, 2006 at 11:16:51AM +0400, Yar Tikhiy wrote:
> On Wed, Aug 16, 2006 at 03:59:13PM -0500, Brooks Davis wrote:
> > On Thu, Aug 17, 2006 at 08:49:27AM +1200, Andrew Thompson wrote:
> > > On Wed, Aug 16, 2006 at 12:15:25PM -0500, Brooks Davis wrote:
> > > > On Wed, Aug 16, 2006 at 07:58:44PM +0400, Yar Tikhiy wrote:
> > > > > On Wed, Aug 16, 2006 at 09:54:19AM -0500, Brooks Davis wrote:
> > > > > > On Wed, Aug 16, 2006 at 10:23:13AM +0200, Stefan Bethke wrote:
> > > > > > >=20
> > > > > > > Ouch. Don't ppp(8), OpenVPN etc. destroy the tun interface th=
ey're =20
> > > > > > > using when they exit?  Flushing all routes then would be rath=
er =20
> > > > > > > harmful.  I'm glad I haven't updated to a newer -stable yet t=
hen :-)
> > > > > >=20
> > > > > > In general, no since tun interfaces can not be destroyed.
> > > > >=20
> > > > > Did you mean "in particular"? :-)
> > > > >=20
> > > > > The problem can be triggered by destroying any interface that can
> > > > > be destroyed.  Just imagine getting rid of a defunct gif tunnel on
> > > > > a remote router, or removing an unused vlan, and totally losing
> > > > > connectivity to the router due to its default route having been
> > > > > flushed.  The scenario still can be quite unpleasant.  I'd rather
> > > > > change the default for $removable_route_flush to NO and let the
> > > > > kernel choose which routes should be flushed upon the physical
> > > > > ejection or software destruction of an interface.  Note that this
> > > > > doesn't include static_routes_${ifn}, which are handled separately
> > > > > by pccard_ether_stop().
> > > >=20
> > > > Agreed.  That code shouldn't be on by default.  I've disabled in it=
 HEAD
> > > > and will MFC in a few days.  As another poster said, I'm not even s=
ure
> > > > it should exist as an option.
> > >=20
> > > Thanks for fixing this up, it certainly was odd to be flushing routes=
 in
> > > userland. I have one more bug report from the ifnet/devd change to lo=
ok
> > > at where renamed interfaces give some sort of an error.
> >=20
> > It is a rather weird bit of code.  It deletes all IPv4 routes on exit.
> > I suspect it's a hack left over from before interface removal really
> > worked.  I may just delete the code in HEAD after the MFC.  I think we
> > could also remove the arp flush or move it into "netif stop" and narrow
> > it with the -i option.
>=20
> The -i option may not work in that case because the interface has
> ceased to exist by the time devd(8) gets the notification and runs
> /etc/pccard_ether.  It could be better just to remove the arp flush
> completely.  The kernel should take care of the arp entries by itself.
> Thanks!

I decided to leave it in, but protect it with ifexists.  That way we
preserve the scripts secondary roll of downing an interface.  I'll
probalby move it into network.subr:ifconfig_down() at some point.

-- Brooks

--ZGiS0Q5IWpPtfppv
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFE5HWiXY6L6fI4GtQRAqUcAJ0VZKadJNZoAqceIY/tOTA/at2yZwCdHSjF
JagXrJgmsD8YPpCZV4TfySo=
=9YlG
-----END PGP SIGNATURE-----

--ZGiS0Q5IWpPtfppv--



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