]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
GAS: Set temporary session timeout bigger than gas_comeback_delay
authorDaniel Kim <kimdan@qca.qualcomm.com>
Mon, 30 Jan 2017 11:23:29 +0000 (13:23 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 30 Jan 2017 11:25:48 +0000 (13:25 +0200)
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 <kimdan@qca.qualcomm.com>
src/ap/gas_serv.c

index 3878ce6d80d5b5dcf28973f4cf7eb5298f881adc..95f0a667e57d5b86ba224eb6cbccc4b37b285362 100644 (file)
@@ -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);
        }