From owner-freebsd-net@FreeBSD.ORG Tue May 4 23:02:42 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A98716A4CE for ; Tue, 4 May 2004 23:02:42 -0700 (PDT) Received: from tx1.oucs.ox.ac.uk (tx1.oucs.ox.ac.uk [129.67.1.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0444843D3F for ; Tue, 4 May 2004 23:02:40 -0700 (PDT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan1.oucs.ox.ac.uk ([129.67.1.166] helo=localhost) by tx1.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1BLFUM-0004Gh-JI for freebsd-net@freebsd.org; Wed, 05 May 2004 07:02:39 +0100 Received: from rx1.oucs.ox.ac.uk ([129.67.1.165]) by localhost (scan1.oucs.ox.ac.uk [129.67.1.166]) (amavisd-new, port 25) with ESMTP id 15791-10 for ; Wed, 5 May 2004 07:02:38 +0100 (BST) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx1.oucs.ox.ac.uk with smtp (Exim 4.24) id 1BLFUM-0004Ge-5s for freebsd-net@freebsd.org; Wed, 05 May 2004 07:02:38 +0100 Received: (qmail 4549 invoked by uid 1004); 5 May 2004 06:02:38 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.20 (clamscan: 0.67. sweep: 2.18/3.79. Clear:RC:1(163.1.161.131):. Processed in 0.442141 secs); 05 May 2004 06:02:38 -0000 Received: from dhcp1131.wadham.ox.ac.uk (HELO piii600.wadham.ox.ac.uk) (163.1.161.131) by gateway.wadham.ox.ac.uk with SMTP; 5 May 2004 06:02:38 -0000 Message-Id: <6.1.0.6.1.20040505065826.03e1d510@popserver.sfu.ca> X-Sender: cperciva@popserver.sfu.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Wed, 05 May 2004 07:02:33 +0100 To: Luigi Rizzo From: Colin Percival In-Reply-To: <20040504063500.A37862@xorpc.icir.org> References: <6.1.0.6.1.20040504133711.03d1ce18@popserver.sfu.ca> <20040504063500.A37862@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" cc: freebsd-net@freebsd.org cc: Colin Percival Subject: Re: [patch] Verify that ifaddr_byindex(foo) != NULL X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2004 06:02:42 -0000 At 14:35 04/05/2004, Luigi Rizzo wrote: >On Tue, May 04, 2004 at 01:42:20PM +0100, Colin Percival wrote: >> if we're going to check that >> 0 < ifp->if_index <= if_index, it seems that we should also be >> checking that ifp->if_index corresponds to an interface which >> still exists (rather than a gap left behind when an interface was >> removed). > >well, the problem here and elsewhere is whether we trust the rcvif >field or not Right; I wasn't sure if we did trust it. In particular, I wonder about packets received immediately before an interface is removed. >So i'd vote to remove all the bogus checks here and elsewhere, rather >than add newer ones. If the check is unnecessary, by all means remove it; but the current situation, where a check is half-performed, is certainly not correct. :-) Colin Percival