From: Daniel Kim Date: Mon, 30 Jan 2017 11:23:29 +0000 (+0200) Subject: GAS: Set temporary session timeout bigger than gas_comeback_delay X-Git-Tag: hostap_2_7~1699 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4cc61c3866758eb665af3e9fc95f8199bee0e700;p=thirdparty%2Fhostap.git GAS: Set temporary session timeout bigger than gas_comeback_delay Previously, the temporary STA session timeout was set to 5 seconds. If gas_comeback_delay is configured to be longer than 5 seconds, GAS Comeback Response frame can't include queried information as all pending data has already been cleared due to session timeout. This commit resolves the issue by setting session timeout to be larger than gas_comeback_delay. Signed-off-by: Daniel Kim --- diff --git a/src/ap/gas_serv.c b/src/ap/gas_serv.c index 3878ce6d8..95f0a667e 100644 --- a/src/ap/gas_serv.c +++ b/src/ap/gas_serv.c @@ -50,9 +50,12 @@ gas_dialog_create(struct hostapd_data *hapd, const u8 *addr, u8 dialog_token) sta->flags |= WLAN_STA_GAS; /* * The default inactivity is 300 seconds. We don't need - * it to be that long. + * it to be that long. Use five second timeout and increase this + * with the comeback_delay for testing cases. */ - ap_sta_session_timeout(hapd, sta, 5); + ap_sta_session_timeout(hapd, sta, + hapd->conf->gas_comeback_delay / 1024 + + 5); } else { ap_sta_replenish_timeout(hapd, sta, 5); }