aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-10-31 19:36:43 (GMT)
committerJouni Malinen <j@w1.fi>2010-10-31 19:36:43 (GMT)
commit65ae1afd449dac9a2aad0c5fceccdaf18cc312aa (patch)
tree62818d7c25cf4f11e41f156dd25e1c5a479d8770
parentacec8d320384c636e6d3b89de8e628fded1bf6c9 (diff)
downloadhostap-65ae1afd449dac9a2aad0c5fceccdaf18cc312aa.zip
hostap-65ae1afd449dac9a2aad0c5fceccdaf18cc312aa.tar.gz
hostap-65ae1afd449dac9a2aad0c5fceccdaf18cc312aa.tar.bz2
nl80211: Pass data frames from unknown STAs to hostapd
Pass data frames from unknown STAs to hostapd in order to reply with a Deauthentication or Disassociation frame. This fixes compliance with IEEE Std 802.11-2007, 11.3. Furthermore, this does not cause a lot of overhead (at least with mac80211 drivers) since mac80211 does not pass all data frames (but at least from unauthenticated and unassociated STAs) to cooked monitor interfaces. Tested with rt2800pci on a MIPS board. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
-rw-r--r--src/drivers/driver_nl80211.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index c172409..5caa2fc 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -3652,8 +3652,15 @@ static struct sock_filter msock_filter_insns[] = {
* add a filter here that filters on our DA and that flag
* to allow us to deauth frames to that bad station.
*
- * Not a regression -- we didn't do it before either.
+ * For now allow all To DS data frames through.
*/
+ /* load the IEEE 802.11 frame control field */
+ BPF_STMT(BPF_LD | BPF_H | BPF_IND, 0),
+ /* mask off frame type, version and DS status */
+ BPF_STMT(BPF_ALU | BPF_AND | BPF_K, 0x0F03),
+ /* accept frame if version 0, type 2 and To DS, fall through otherwise
+ */
+ BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, 0x0801, PASS, 0),
#if 0
/*