From owner-cvs-all@FreeBSD.ORG Wed Mar 31 06:09:25 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4090B16A4E4; Wed, 31 Mar 2004 06:09:25 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D457D43D4C; Wed, 31 Mar 2004 06:09:24 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.10/8.12.10) with ESMTP id i2VE6vxC010909; Wed, 31 Mar 2004 09:06:57 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i2VE6uCN010906; Wed, 31 Mar 2004 09:06:56 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 31 Mar 2004 09:06:56 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Ruslan Ermilov In-Reply-To: <20040331072756.GA14337@ip.net.ua> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Brooks Davis cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/net if_gif.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2004 14:09:26 -0000 On Wed, 31 Mar 2004, Ruslan Ermilov wrote: > > > 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. While you're at it, we also need loop detection in if_gre. Make sure to check the IP- and IPv6-layer pieces of these as well. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research