aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/rx_mgmt.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-11-23 11:15:25 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-23 11:15:25 (GMT)
commitf665867bd13212b6a025e4cf37981515b0f28a61 (patch)
treeac73b1052b7ae6790fa3a08460dc0a1729b5e014 /wlantest/rx_mgmt.c
parent3c7302c219a6513603bfe038f8e512bb6cef68d8 (diff)
downloadhostap-f665867bd13212b6a025e4cf37981515b0f28a61.zip
hostap-f665867bd13212b6a025e4cf37981515b0f28a61.tar.gz
hostap-f665867bd13212b6a025e4cf37981515b0f28a61.tar.bz2
wlantest: Check STA State when validating need for CCMP for mgmt
If the STA is in State 1 or 2, Deauth/Disassoc frames are not protected, so no need to complain about them being sent without CCMP.
Diffstat (limited to 'wlantest/rx_mgmt.c')
-rw-r--r--wlantest/rx_mgmt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c
index 9b1f061..1e94a6c 100644
--- a/wlantest/rx_mgmt.c
+++ b/wlantest/rx_mgmt.c
@@ -894,7 +894,9 @@ static int check_mgmt_ccmp(struct wlantest *wt, const u8 *data, size_t len)
if (sta == NULL)
return 0;
- if (sta->rsn_capab & WPA_CAPABILITY_MFPC) {
+ if ((sta->rsn_capab & WPA_CAPABILITY_MFPC) &&
+ (sta->state == STATE3 ||
+ WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION)) {
wpa_printf(MSG_INFO, "Robust individually-addressed "
"management frame sent without CCMP by "
MACSTR, MAC2STR(mgmt->sa));