From: Jouni Malinen Date: Fri, 3 Nov 2017 08:49:45 +0000 (+0200) Subject: Fix Status Code in TKIP countermeasures case X-Git-Tag: hostap_2_7~907 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe12ae777f2c3380bb5a4fcb457639d45261c642;p=thirdparty%2Fhostap.git Fix Status Code in TKIP countermeasures case 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 --- diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 792f0bc4b..8f5ae87c2 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -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; }