From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 10 20:50:22 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4B9416A4CE for ; Sat, 10 Apr 2004 20:50:22 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0E2443D3F for ; Sat, 10 Apr 2004 20:50:22 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3B3oMbv050112 for ; Sat, 10 Apr 2004 20:50:22 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i3B3oMaS050111; Sat, 10 Apr 2004 20:50:22 -0700 (PDT) (envelope-from gnats) Date: Sat, 10 Apr 2004 20:50:22 -0700 (PDT) Message-Id: <200404110350.i3B3oMaS050111@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Darren Reed Subject: Re: kern/64718: [patch] Bridged packets still seen by BPF listener after BIOCSEESENT ioctl. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Darren Reed List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2004 03:50:22 -0000 The following reply was made to PR kern/64718; it has been noted by GNATS. From: Darren Reed To: Ed Maste Cc: Darren Reed , 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 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