Date: Sat, 10 Apr 2004 19:20:17 -0700 (PDT) From: Ed Maste <emaste@sandvine.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/64718: [patch] Bridged packets still seen by BPF listener after BIOCSEESENT ioctl. Message-ID: <200404110220.i3B2KH6D038202@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/64718; it has been noted by GNATS.
From: Ed Maste <emaste@sandvine.com>
To: Darren Reed <darrenr@FreeBSD.ORG>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/64718: [patch] Bridged packets still seen by BPF listener
after BIOCSEESENT ioctl.
Date: Sat, 10 Apr 2004 22:15:07 -0400
> It is your expectation that is wrong here.
No, I'm sorry, but at the very least the documentation is
inconsistent. You left out part of the man page:
BIOCGSEESENT (u_int) Set or get the flag determining whether locally
generated packets on the interface should be returned by
BPF. Set to zero to see only incoming packets on the
interface.
The above makes no reference to packets that are not locally
generated nor received on the interface. However, according to
the above if I set the flag to zero I should see only received
packets on the interface, which is not the case. So yes, there
is a bug here.
I would argue that the behaviour implied by the second sentence
is more generally useful, but that's just my opinion.
Note however that independent of the above, there's still a bug
with the seesent code. A struct m_hdr is allocated on the stack
and cast to a struct mbuf * in ether_input before the call to
bpf_mtap. The seesent check then accesses m->m_pkthdr.rcvif.
Regards,
-ed
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404110220.i3B2KH6D038202>
