Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2004 10:27:56 +0300
From:      Ruslan Ermilov <ru@freebsd.org>
To:        Brooks Davis <brooks@one-eyed-alien.net>
Cc:        cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/net if_gif.c
Message-ID:  <20040331072756.GA14337@ip.net.ua>
In-Reply-To: <20040330232517.GA19416@Odin.AC.HMC.Edu>
References:  <200403221424.i2MEOQYK057524@repoman.freebsd.org> <20040330220349.GA97921@ip.net.ua> <20040330232517.GA19416@Odin.AC.HMC.Edu>

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

[-- Attachment #1 --]
On Tue, Mar 30, 2004 at 03:25:17PM -0800, Brooks Davis wrote:
> On Wed, Mar 31, 2004 at 01:03:49AM +0300, Ruslan Ermilov wrote:
> > On Mon, Mar 22, 2004 at 06:24:26AM -0800, Robert Watson wrote:
> > > rwatson     2004/03/22 06:24:26 PST
> > > 
> > >   FreeBSD src repository
> > > 
> > >   Modified files:
> > >     sys/net              if_gif.c 
> > >   Log:
> > >   Move "called", a static function variable used to detect recursive
> > >   processing with gif interfaces, to a global variable named "gif_called".
> > >   Add an annotation that this approach will not work with a reentrant
> > >   network stack, and that we should instead use packet tags to detect
> > >   excessive recursive processing.
> > >   
> > >   Revision  Changes    Path
> > >   1.42      +11 -4     src/sys/net/if_gif.c
> > > 
> > Implemented this in the attached patch.  Note when testing: setting
> > net.link.gif.max_nesting too high (>20 on my system) and triggering
> > the recursion causes the kernel stack exhaustion.
> 
> Why not just do what OpenBSD does and do actual loop detection?  This
> gets rid of the nesting count hack which isn't really what you want to
> measure anyway.
> 
> http://www.openbsd.org/cgi-bin/cvsweb/src/sys/net/if_gif.c.diff?r1=1.18&r2=1.19
> 
Good idea.  I will implement it and repost the updated patch here.


Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAanL8Ukv4P6juNwoRApTPAJ9k4ny+JovpKqaSyVT2/L2zl0ql7QCeKLYj
2pt9ATQokB3m0nbzlULNKec=
=N29Z
-----END PGP SIGNATURE-----
help

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