]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix Status Code in TKIP countermeasures case
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 3 Nov 2017 08:49:45 +0000 (10:49 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 3 Nov 2017 17:59:46 +0000 (19:59 +0200)
The previously used WLAN_REASON_MICHAEL_MIC_FAILURE (14) value as a
response to Authentication frame or (Re)Association Request frame is not
correct since the resp value is encoded in the Status Code (not Reason
Code) field. Status Code 14 is WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION
which is really what this value would have meant in the response frames.

There is no Michael MIC failure status code, so have to use the generic
"Unspecified failure" (1) reason code for these cases.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/ap/ieee802_11.c

index 792f0bc4b60f0d96b96218dbac773609c316c2d9..8f5ae87c2df0d84cd4ae20298df778bcf8f546e9 100644 (file)
@@ -1686,7 +1686,7 @@ static void handle_auth(struct hostapd_data *hapd,
 #endif /* CONFIG_NO_RC4 */
 
        if (hapd->tkip_countermeasures) {
-               resp = WLAN_REASON_MICHAEL_MIC_FAILURE;
+               resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
                goto fail;
        }
 
@@ -3191,7 +3191,7 @@ static void handle_assoc(struct hostapd_data *hapd,
                WLAN_FC_STYPE_ASSOC_REQ;
 
        if (hapd->tkip_countermeasures) {
-               resp = WLAN_REASON_MICHAEL_MIC_FAILURE;
+               resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
                goto fail;
        }