From owner-cvs-src@FreeBSD.ORG Tue Mar 30 23:27:55 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB4D316A4CE; Tue, 30 Mar 2004 23:27:55 -0800 (PST) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1198843D3F; Tue, 30 Mar 2004 23:27:54 -0800 (PST) (envelope-from ru@ip.net.ua) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id i2V7VRbn035350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 31 Mar 2004 10:31:28 +0300 (EEST) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.12.11/8.12.11) id i2V7RuLr014370; Wed, 31 Mar 2004 10:27:56 +0300 (EEST) (envelope-from ru) Date: Wed, 31 Mar 2004 10:27:56 +0300 From: Ruslan Ermilov To: Brooks Davis Message-ID: <20040331072756.GA14337@ip.net.ua> References: <200403221424.i2MEOQYK057524@repoman.freebsd.org> <20040330220349.GA97921@ip.net.ua> <20040330232517.GA19416@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: <20040330232517.GA19416@Odin.AC.HMC.Edu> User-Agent: Mutt/1.5.6i X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: Robert Watson cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/net if_gif.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2004 07:27:55 -0000 --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > > >=20 > > > FreeBSD src repository > > >=20 > > > Modified files: > > > sys/net if_gif.c=20 > > > Log: > > > Move "called", a static function variable used to detect recursive > > > processing with gif interfaces, to a global variable named "gif_cal= led". > > > 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. > > > =20 > > > Revision Changes Path > > > 1.42 +11 -4 src/sys/net/if_gif.c > > >=20 > > 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. >=20 > 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. >=20 > http://www.openbsd.org/cgi-bin/cvsweb/src/sys/net/if_gif.c.diff?r1=3D1.18= &r2=3D1.19 >=20 Good idea. I will implement it and repost the updated patch here. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --huq684BweRXVnRxX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAanL8Ukv4P6juNwoRApTPAJ9k4ny+JovpKqaSyVT2/L2zl0ql7QCeKLYj 2pt9ATQokB3m0nbzlULNKec= =N29Z -----END PGP SIGNATURE----- --huq684BweRXVnRxX--