From: Jouni Malinen Date: Tue, 23 Nov 2010 11:15:25 +0000 (+0200) Subject: wlantest: Check STA State when validating need for CCMP for mgmt X-Git-Tag: hostap-1-bp~753 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f665867bd13212b6a025e4cf37981515b0f28a61;p=thirdparty%2Fhostap.git 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. --- diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c index 9b1f061b8..1e94a6ca3 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));