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 <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-11-03 10:49:45 +02:00 committed by Jouni Malinen
parent dea2ab99d7
commit fe12ae777f

View file

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