From owner-cvs-all@FreeBSD.ORG Tue Feb 3 08:09:33 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 8DC1716A4D0 for ; Tue, 3 Feb 2004 08:09:33 -0800 (PST) Received: from mailtoaster1.pipeline.ch (mailtoaster1.pipeline.ch [62.48.0.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9733343D54 for ; Tue, 3 Feb 2004 08:09:28 -0800 (PST) (envelope-from andre@freebsd.org) Received: (qmail 65978 invoked from network); 3 Feb 2004 16:09:27 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by mailtoaster1.pipeline.ch (qmail-ldap-1.03) with SMTP for ; 3 Feb 2004 16:09:27 -0000 Message-ID: <401FC7B5.D2B9BD52@freebsd.org> Date: Tue, 03 Feb 2004 17:09:25 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Bruce M Simpson References: <200402022253.i12MrGkO091411@repoman.freebsd.org> <20040202232614.GA24019@Odin.AC.HMC.Edu> <401EE109.D45B606@freebsd.org> <20040203000622.GA19568@Odin.AC.HMC.Edu> <20040203122436.GE713@saboteur.dek.spc.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Brooks Davis 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: Tue, 03 Feb 2004 16:09:33 -0000 Bruce M Simpson wrote: > > On Mon, Feb 02, 2004 at 04:06:22PM -0800, Brooks Davis wrote: > > I'm not sugguesting caching the ifp. I'm suggesting storing the value > > of ifp->if_index. You then use ifnet_byindex to get then the ifp when > > needed. You have to check that it isn't NULL, but you should to be > > doing that for the ifunit() call as well since it will return NULL and > > cause a panic if the admin makes a typo. > > Good catch. Thanks. In the code I committed the case of an invalid interface name (or typo) is correctly handled and will not panic the system. I tested that as one of the first things when I wrote that code. ;) At the moment I'm changing it to use the ifindex method Brooks suggests. -- Andre