Date: Thu, 10 Oct 2013 05:24:54 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Patrick Kelsey <kelsey@ieee.org> Cc: FreeBSD Net <freebsd-net@freebsd.org>, "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org> Subject: Re: [ieee80211] [patch] BPF taps not working for ieee80211 interfaces in monitor mode Message-ID: <CAJ-VmokMqGBsEjM-cB6U5=tvKu7TCk4zZFyczV6%2BgsKAtJh_CA@mail.gmail.com> In-Reply-To: <CAD44qMVeT_FJP26NSt5uXRdqzyWvZvYNOMpybnAG5u9YunqVQw@mail.gmail.com> References: <CAD44qMVeT_FJP26NSt5uXRdqzyWvZvYNOMpybnAG5u9YunqVQw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 9 October 2013 17:27, Patrick Kelsey <kelsey@ieee.org> wrote: > Hi, > > A bug was introduced in r254082 that results in BPF taps never being > enabled for ieee80211 interfaces that are in monitor mode. > > Before r254082, bpf_track() in sys/net80211/ieee80211_freebsd.c was > identifying ieee80211 interfaces by checking to see if the value of > the ifp->if_start pointer was equal to ieee80211_start. r254082 was a > move away from using if_start to using if_transmit in the ieee80211 > stack, and bpf_track() was correspondingly updated to check the value > of ifp->if_transmit against ieee80211_vap_transmit. The problem is > that ifp->if_transmit is set to null_transmit by > ieee80211_vap_attach() in sys/net80211/ieee80211.c for interfaces that > are in monitor mode (code that has been in place since r195846). > > One fix that resolves the issue is to use what is likely to be a more > stable signature in the check in bpf_track(). > > A patch against r256155 is attached. > Hi! Good catch! Yeah, this is all very dirty code that needs to be ripped out. I'll get this committed ASAP. Thanks! -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmokMqGBsEjM-cB6U5=tvKu7TCk4zZFyczV6%2BgsKAtJh_CA>