From 2af4d87fc36040ad8c64dad3016444b85eea607e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 1 Mar 2014 16:51:46 +0200 Subject: [PATCH] GAS: Fix additional comeback delay with status code 95 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 --- src/common/ieee802_11_defs.h | 1 + wpa_supplicant/gas_query.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 520e55d92..cf4664fd1 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -161,6 +161,7 @@ #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) */ diff --git a/wpa_supplicant/gas_query.c b/wpa_supplicant/gas_query.c index a63ee6c1b..aff1950ae 100644 --- a/wpa_supplicant/gas_query.c +++ b/wpa_supplicant/gas_query.c @@ -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);