From owner-cvs-all@FreeBSD.ORG Mon Feb 2 15:45:20 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 2C69A16A4CF for ; Mon, 2 Feb 2004 15:45:20 -0800 (PST) Received: from mailtoaster1.pipeline.ch (mailtoaster1.pipeline.ch [62.48.0.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5AB243D46 for ; Mon, 2 Feb 2004 15:45:15 -0800 (PST) (envelope-from andre@freebsd.org) Received: (qmail 6154 invoked from network); 2 Feb 2004 23:45:14 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by mailtoaster1.pipeline.ch (qmail-ldap-1.03) with SMTP for ; 2 Feb 2004 23:45:14 -0000 Message-ID: <401EE109.D45B606@freebsd.org> Date: Tue, 03 Feb 2004 00:45:13 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Brooks Davis References: <200402022253.i12MrGkO091411@repoman.freebsd.org> <20040202232614.GA24019@Odin.AC.HMC.Edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet ip_icmp.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: Mon, 02 Feb 2004 23:45:20 -0000 Brooks Davis wrote: > > On Mon, Feb 02, 2004 at 02:53:16PM -0800, Andre Oppermann wrote: > > andre 2004/02/02 14:53:16 PST > > > > FreeBSD src repository > > > > Modified files: > > sys/netinet ip_icmp.c > > Log: > > Add sysctl net.inet.icmp.reply_src to specify the interface name > > used for the ICMP reply source in reponse to packets which are not > > directly addressed to us. By default continue with with normal > > source selection. > > Please consider storing the interface index rather then the name. It is > much cheaper to go from index to ifp then name to ifp and the index will > be invariant as long as the interface exists. Sometime in the next week > the name will no longer be invariant. I considered storing the ifp but the moment a stored ipf disappears you get an instant panic. There is no way to verify if the interface pointer is still valid. And with interface cloning I considered the panic risk too high. The only other way would be to check the ifp every time a interface is manipulated and to purge the ifp if its interface is gone. I thought that was too intrusive. -- Andre