From fe12ae777f2c3380bb5a4fcb457639d45261c642 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 3 Nov 2017 10:49:45 +0200 Subject: [PATCH] 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 --- src/ap/ieee802_11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }