Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 May 2004 07:02:33 +0100
From:      Colin Percival <colin.percival@wadham.ox.ac.uk>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        Colin Percival <colin.percival@wadham.ox.ac.uk>
Subject:   Re: [patch] Verify that ifaddr_byindex(foo) != NULL
Message-ID:  <6.1.0.6.1.20040505065826.03e1d510@popserver.sfu.ca>
In-Reply-To: <20040504063500.A37862@xorpc.icir.org>
References:  <6.1.0.6.1.20040504133711.03d1ce18@popserver.sfu.ca> <20040504063500.A37862@xorpc.icir.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.1.0.6.1.20040505065826.03e1d510>