From: Jouni Malinen Date: Sun, 25 May 2014 15:34:10 +0000 (+0300) Subject: GAS: Send error response if no room for pending dialog context X-Git-Tag: hostap_2_2~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d73c7b9626c070bdf1f70c8aa51dea207d187430;p=thirdparty%2Fhostap.git GAS: Send error response if no room for pending dialog context Instead of silently dropping the response that requires fragmentation, send an error response to the station to make it aware that no full response will be available. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c index 49f6e87bd..b40688060 100644 --- a/src/ap/gas_serv.c +++ b/src/ap/gas_serv.c @@ -989,14 +989,17 @@ static void gas_serv_req_local_processing(struct hostapd_data *hapd, "for " MACSTR " (dialog token %u)", MAC2STR(sa), dialog_token); wpabuf_free(buf); - return; + tx_buf = gas_anqp_build_initial_resp_buf( + dialog_token, WLAN_STATUS_UNSPECIFIED_FAILURE, + 0, NULL); + } else { + di->prot = prot; + di->sd_resp = buf; + di->sd_resp_pos = 0; + tx_buf = gas_anqp_build_initial_resp_buf( + dialog_token, WLAN_STATUS_SUCCESS, + comeback_delay, NULL); } - di->prot = prot; - di->sd_resp = buf; - di->sd_resp_pos = 0; - tx_buf = gas_anqp_build_initial_resp_buf( - dialog_token, WLAN_STATUS_SUCCESS, comeback_delay, - NULL); } else { wpa_printf(MSG_DEBUG, "ANQP: Initial response (no comeback)"); tx_buf = gas_anqp_build_initial_resp_buf(