kern/64718: [patch] Bridged packets still seen by BPF listener
after BIOCSEESENT ioctl.
Darren Reed
darrenr at hub.freebsd.org
Sat Apr 10 20:50:22 PDT 2004
The following reply was made to PR kern/64718; it has been noted by GNATS.
From: Darren Reed <darrenr at hub.freebsd.org>
To: Ed Maste <emaste at sandvine.com>
Cc: Darren Reed <darrenr at FreeBSD.ORG>,
freebsd-gnats-submit at FreeBSD.org
Subject: Re: kern/64718: [patch] Bridged packets still seen by BPF listener after BIOCSEESENT ioctl.
Date: Sat, 10 Apr 2004 20:43:59 -0700
On Sat, Apr 10, 2004 at 10:15:07PM -0400, Ed Maste wrote:
> >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.
Ok, can we agree the man page is, perhaps, ambiguous about what
should happen to forwarded packets ?
In the case of a host that is not a gateway, the above entry does
make sense. Agreed ?
> 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.
Yes, I can see that.
However, FreeBSD-current doesn't work this way any more, so this
fix would be a 4.x one only, if something were to be changed.
Darren
More information about the freebsd-bugs
mailing list