Re: Question on IFF_PPROMISC (and IFF_PROMISC)

From: Yar Tikhiy <yar_at_comp.chem.msu.su>
Date: Mon, 30 Jan 2006 21:50:41 +0300
On Fri, Jan 27, 2006 at 01:47:46PM +0100, Gregory Nou wrote:
> 
> I found a (somewhat old) post from gnn_at_ on this topic there :
> http://unix.derkeiler.com/Mailing-Lists/FreeBSD/net/2004-09/0289.html
> 
> I also think that it would be a good idea to do it (at least, it would
> be easier to understand, because IFF_PPROMISC is not that explicit). If
> nobody has already done it, I'll work on this.
>
> There is another point on which I would appreciate to know your opinion:
> referring to if.c[1269], I understand that if IFF_PPROMISC is set in
> ifp->if_flags, IFF_PROMISC should be set to (or we are in a transient
> situation).
> It appears that if_ethersubr.c[652] is working in this case. Isn't it a
> mistake ?

IMHO there's little point in changing the identifier's name.  That
will do more harm than good.  The existing code looks correct to
me.  if_ethersubr.c:652 drops a frame not addressed to us only if
IFF_PROMISC is set, but IFF_PPROMISC is not set.  The point is that
if IFF_PPROMISC is set, the frame will be passed up to IP or whatever
anyway.

-- 
Yar
Received on Mon Jan 30 2006 - 17:51:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:51 UTC