From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 10 19:20:17 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 371B816A4CE for ; Sat, 10 Apr 2004 19:20:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FE1B43D1D for ; Sat, 10 Apr 2004 19:20:17 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3B2KHbv038203 for ; Sat, 10 Apr 2004 19:20:17 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i3B2KH6D038202; Sat, 10 Apr 2004 19:20:17 -0700 (PDT) (envelope-from gnats) Date: Sat, 10 Apr 2004 19:20:17 -0700 (PDT) Message-Id: <200404110220.i3B2KH6D038202@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Ed Maste 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: Ed Maste List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2004 02:20:17 -0000 The following reply was made to PR kern/64718; it has been noted by GNATS. From: Ed Maste To: Darren Reed 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