]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wlantest: Do not report PMF failure without BSS supporting PMF
authorJouni Malinen <j@w1.fi>
Sat, 14 Mar 2020 16:20:31 +0000 (18:20 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 14 Mar 2020 16:20:31 +0000 (18:20 +0200)
Previously, missing CCMP protection on Robust Management frames was
reported based on the STA having indicated MFPC=1. That is not accurate
since the AP/BSS may have MFPC=0. Report this failure only if both the
AP and STA have indicated MFPC=1, i.e., when PMF has been negotiated for
the association.

Signed-off-by: Jouni Malinen <j@w1.fi>
wlantest/rx_mgmt.c

index 78fd3c80a60c841fb48051ec190a4ce45061d65f..ad388e122c653ddcb3a419f19e79959ab5b02f04 100644 (file)
@@ -1646,7 +1646,8 @@ 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 ((bss->rsn_capab & WPA_CAPABILITY_MFPC) &&
+           (sta->rsn_capab & WPA_CAPABILITY_MFPC) &&
            (sta->state == STATE3 ||
             WLAN_FC_GET_STYPE(fc) == WLAN_FC_STYPE_ACTION)) {
                add_note(wt, MSG_INFO, "Robust individually-addressed "