aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/rx_data.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-13 10:54:07 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-13 10:54:07 (GMT)
commit20062114cdd1ae8a456642175430aaf6831352be (patch)
tree02f3bcaed319dd75e03f5fa12e5ae71ef9468497 /wlantest/rx_data.c
parent4dac84539e126abb42b28d1fb9b8b4e5d6b3635a (diff)
downloadhostap-20062114cdd1ae8a456642175430aaf6831352be.zip
hostap-20062114cdd1ae8a456642175430aaf6831352be.tar.gz
hostap-20062114cdd1ae8a456642175430aaf6831352be.tar.bz2
wlantest: Verify that TKIP/CCMP frames set ExtIV=1
Diffstat (limited to 'wlantest/rx_data.c')
-rw-r--r--wlantest/rx_data.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/wlantest/rx_data.c b/wlantest/rx_data.c
index ab0ab0f..24de59f 100644
--- a/wlantest/rx_data.c
+++ b/wlantest/rx_data.c
@@ -971,6 +971,14 @@ static void rx_data_bss_prot_group(struct wlantest *wt,
return;
}
+ if (bss->group_cipher & (WPA_CIPHER_TKIP | WPA_CIPHER_CCMP) &&
+ !(data[3] & 0x20)) {
+ wpa_printf(MSG_INFO, "Expected TKIP/CCMP frame from "
+ MACSTR " did not have ExtIV bit set to 1",
+ MAC2STR(bss->bssid));
+ return;
+ }
+
keyid = data[3] >> 6;
if (bss->gtk_len[keyid] == 0) {
wpa_printf(MSG_MSGDUMP, "No GTK known to decrypt the frame "
@@ -1046,6 +1054,14 @@ static void rx_data_bss_prot(struct wlantest *wt,
return;
}
+ if (sta->pairwise_cipher & (WPA_CIPHER_TKIP | WPA_CIPHER_CCMP) &&
+ !(data[3] & 0x20)) {
+ wpa_printf(MSG_INFO, "Expected TKIP/CCMP frame from "
+ MACSTR " did not have ExtIV bit set to 1",
+ MAC2STR(src));
+ return;
+ }
+
keyid = data[3] >> 6;
if (keyid != 0) {
wpa_printf(MSG_INFO, "Unexpected non-zero KeyID %d in "