Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2007 21:22:10 +0100
From:      "Bruce M. Simpson" <bms@FreeBSD.org>
To:        Andrew Thompson <thompsa@FreeBSD.org>
Cc:        FreeBSD Current <current@freebsd.org>
Subject:   Re: multicast packets from bpf
Message-ID:  <46D483F2.2040207@FreeBSD.org>
In-Reply-To: <20070828103110.GA43049@heff.fud.org.nz>
References:  <20070828040026.GB42201@heff.fud.org.nz>	<46D3C9F3.2010802@FreeBSD.org> <20070828103110.GA43049@heff.fud.org.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Thompson wrote:
> I had originally started to put it there but realised that I need a
> pointer to the ifnet to read if_broadcastaddr, I didnt think it was
> worth changing the function parameters when the check can also just go
> in bpfwrite. I dont mind moving it if its the more correct place to put=

> it.
>  =20

It's already got a switch..case breakout for the DLTs and knows how to=20
grok the 802.11 header format which can have up to 6 (yes, 6) 802.3=20
style MAC addresses, all of which mean different things depending on=20
whether you are STA, AP, Mesh Portal, Mesh AP... :-)

So it seems like the right place. bpf_movein() is static and referenced=20
once within its translation unit, so it is a candidate for inlining; I=20
would change ifp-=BBif_mtu to ifp in the call.

> Is the tapwrite patch still needed? The mbuf is passed to ether_input
> which should do the right thing.
>  =20

Good point. A casual reading suggests it *may* no longer be needed since =

my pass over ether_input(), but seeing as we're due to branch and all,=20
I'll leave garbage collecting the 10 lines in tapwrite() to someone=20
else. :-)

> I could go with this but it seems wrong to be passed a mbuf which has
> incorrect flags, there may be other places in the stack that look for
> M_*CAST that also have quirks.
>  =20

Yup. Someone could potentially drive a netgraph stake between the=20
producer and the if_bridge consumer...

Thank you for looking at this btw.

regards,
BMS




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