aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/rx_mgmt.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-13 11:14:09 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-13 11:14:09 (GMT)
commitf3b9ed70c5a269826d0232870788b3fdf89d4d26 (patch)
tree04989be3d7a7f7bfd6f14c39f043f510461e9536 /wlantest/rx_mgmt.c
parent16b8b6eadf20a5dae655cd7523dae3a56ff77eaf (diff)
downloadhostap-f3b9ed70c5a269826d0232870788b3fdf89d4d26.zip
hostap-f3b9ed70c5a269826d0232870788b3fdf89d4d26.tar.gz
hostap-f3b9ed70c5a269826d0232870788b3fdf89d4d26.tar.bz2
wlantest: Validate MMIE KeyID reserved bits
Diffstat (limited to 'wlantest/rx_mgmt.c')
-rw-r--r--wlantest/rx_mgmt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c
index 27120df..4ee376c 100644
--- a/wlantest/rx_mgmt.c
+++ b/wlantest/rx_mgmt.c
@@ -587,7 +587,7 @@ static int check_bip(struct wlantest *wt, const u8 *data, size_t len)
const struct ieee80211_mgmt *mgmt;
u16 fc, stype;
const u8 *mmie;
- int keyid;
+ u16 keyid;
struct wlantest_bss *bss;
mgmt = (const struct ieee80211_mgmt *) data;
@@ -619,6 +619,11 @@ static int check_bip(struct wlantest *wt, const u8 *data, size_t len)
mmie = data + len - 16;
keyid = WPA_GET_LE16(mmie);
+ if (keyid & 0xf000) {
+ wpa_printf(MSG_INFO, "MMIE KeyID reserved bits not zero "
+ "(%04x) from " MACSTR, keyid, MAC2STR(mgmt->sa));
+ keyid &= 0x0fff;
+ }
if (keyid < 4 || keyid > 5) {
wpa_printf(MSG_INFO, "Unexpected MMIE KeyID %u from " MACSTR,
keyid, MAC2STR(mgmt->sa));