]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
GAS: Fix additional comeback delay with status code 95
authorJouni Malinen <j@w1.fi>
Sat, 1 Mar 2014 14:51:46 +0000 (16:51 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 1 Mar 2014 15:06:20 +0000 (17:06 +0200)
The special case of non-zero status code used in a GAS Comeback Response
frame to indicate that additional delay is needed before the response is
available was not working properly. This case needs to allow the status
code check to be bypassed for the comeback case prior to having received
any response data.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/ieee802_11_defs.h
wpa_supplicant/gas_query.c

index 520e55d9294ed499617241f6038c8874a09284d1..cf4664fd14de4dbd701899f946a491adaa933b71 100644 (file)
 #define WLAN_STATUS_ANTI_CLOGGING_TOKEN_REQ 76
 #define WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED 77
 #define WLAN_STATUS_TRANSMISSION_FAILURE 79
+#define WLAN_STATUS_QUERY_RESP_OUTSTANDING 95
 #define WLAN_STATUS_ASSOC_DENIED_NO_VHT 104
 
 /* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */
index a63ee6c1bbd44e02436bca54874dfa6f6f5401cc..aff1950ae245b6b935ffcb284720ce1a1315ef6b 100644 (file)
@@ -487,7 +487,10 @@ int gas_query_rx(struct gas_query *gas, const u8 *da, const u8 *sa,
        query->status_code = WPA_GET_LE16(pos);
        pos += 2;
 
-       if (query->status_code != WLAN_STATUS_SUCCESS) {
+       if (query->status_code == WLAN_STATUS_QUERY_RESP_OUTSTANDING &&
+           action == WLAN_PA_GAS_COMEBACK_RESP) {
+               wpa_printf(MSG_DEBUG, "GAS: Allow non-zero status for outstanding comeback response");
+       } else if (query->status_code != WLAN_STATUS_SUCCESS) {
                wpa_printf(MSG_DEBUG, "GAS: Query to " MACSTR " dialog token "
                           "%u failed - status code %u",
                           MAC2STR(sa), dialog_token, query->status_code);