Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Aug 2003 13:54:37 +0400
From:      "Vladimir Yu. Stepanov" <vys@renet.ru>
To:        freebsd-hackers@freebsd.org
Subject:   Bug FreeBSD BPF driver
Message-ID:  <3F4F22DD.80202@renet.ru>

next in thread | raw e-mail | index | archive | help
  Hello !

  In file sys/net/bpf.c CVS revision 1.95 introduce a error. It is wrong 
if a program use not default setting flag BIOCGSEESENT. Locally 
generated packet may be copy in user space if flag BIOCGSEESENT set to one.

http://vys.renet.ru/patchs/freebsd-5.1-bpf-1.2.patch

This patch required to allow more effective usage of BPF filter. It
marks every packet as "Incoming" or "Outgoing", in dependence of its 
direction (for given interface). Then, software which uses BPF filter 
can skip additional checking. After applying the patch, BPF filter 
interface still compatible with old software, but BPF_MINOR_VERSION has 
been changed. The structures bpf_hdr and related C code have been changed:
     - added field 'bh_flags' in 'bpf_hdr' structure with the following 
values:
         * BPF_DIRECT_INCOMING (0x4000)
         * BPF_DIRECT_OUTGOING (0x8000)
	this numbers (0x4000,0x8000) select for future export
	flags M_BCAST and M_MCAST in user space.
     - removed SIZEOF_BPF_HDR as not necessary.

-- 
SY. Vladimir Yu. Stepanov




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F4F22DD.80202>