Date: Wed, 9 Oct 2013 20:27:55 -0400 From: Patrick Kelsey <kelsey@ieee.org> To: freebsd-net@freebsd.org Subject: [ieee80211] [patch] BPF taps not working for ieee80211 interfaces in monitor mode Message-ID: <CAD44qMVeT_FJP26NSt5uXRdqzyWvZvYNOMpybnAG5u9YunqVQw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--001a1132ec90b640b204e8581211 Content-Type: text/plain; charset=ISO-8859-1 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. -Patrick --001a1132ec90b640b204e8581211 Content-Type: application/octet-stream; name="ieee80211_bpf_track.patch" Content-Disposition: attachment; filename="ieee80211_bpf_track.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hml8uphc0 SW5kZXg6IHN5cy9uZXQ4MDIxMS9pZWVlODAyMTFfZnJlZWJzZC5jCj09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5 cy9uZXQ4MDIxMS9pZWVlODAyMTFfZnJlZWJzZC5jCShyZXZpc2lvbiAyNTYxNTUpCisrKyBzeXMv bmV0ODAyMTEvaWVlZTgwMjExX2ZyZWVic2QuYwkod29ya2luZyBjb3B5KQpAQCAtODA4LDkgKzgw OCw5IEBACiBzdGF0aWMgdm9pZAogYnBmX3RyYWNrKHZvaWQgKmFyZywgc3RydWN0IGlmbmV0ICpp ZnAsIGludCBkbHQsIGludCBhdHRhY2gpCiB7Ci0JLyogTkI6IGlkZW50aWZ5IHZhcCdzIGJ5IGlm X3N0YXJ0ICovCisJLyogTkI6IGlkZW50aWZ5IHZhcCdzIGJ5IGlmX2luaXQgKi8KIAlpZiAoZGx0 ID09IERMVF9JRUVFODAyXzExX1JBRElPICYmCi0JICAgIGlmcC0+aWZfdHJhbnNtaXQgPT0gaWVl ZTgwMjExX3ZhcF90cmFuc21pdCkgeworCSAgICBpZnAtPmlmX2luaXQgPT0gaWVlZTgwMjExX2lu aXQpIHsKIAkJc3RydWN0IGllZWU4MDIxMXZhcCAqdmFwID0gaWZwLT5pZl9zb2Z0YzsKIAkJLyoK IAkJICogVHJhY2sgYnBmIHJhZGlvdGFwIGxpc3RlbmVyIHN0YXRlLiAgV2UgbWFyayB0aGUgdmFw Cg== --001a1132ec90b640b204e8581211--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAD44qMVeT_FJP26NSt5uXRdqzyWvZvYNOMpybnAG5u9YunqVQw>