[PATCH v2] gas_server: extend timeout for pending responses
Gustavo Bertoli
gubertoli at gmail.com
Tue Jun 9 12:26:46 PDT 2026
Currently, gas_server_response_timeout() unconditionally drops the
session and frees the entry after 60 seconds. This causes deferred
provisioning operations, such as DPP Enterprise certBag delivery,
to silently fail if the CA takes longer than 60 seconds to respond.
Add a bool timeout_extended flag to struct gas_server_response to allow
CA delays greater than GAS_QUERY_TIMEOUT, bounded to at most one
additional GAS_QUERY_TIMEOUT. The first timeout fire reschedules once
(setting the flag); the second fire at 2 * GAS_QUERY_TIMEOUT = 120 s
drops the entry unconditionally, matching the Enrollee's
wpas_dpp_gas_client_timeout.
Signed-off-by: Gustavo Bertoli <gubertoli at gmail.com>
---
src/common/gas_server.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/common/gas_server.c b/src/common/gas_server.c
index 52c14df36..ec9c95455 100644
--- a/src/common/gas_server.c
+++ b/src/common/gas_server.c
@@ -44,6 +44,7 @@ struct gas_server_response {
struct gas_server_handler *handler;
u16 comeback_delay;
bool initial_resp_sent;
+ bool timeout_extended;
};
struct gas_server {
@@ -61,6 +62,15 @@ static void gas_server_response_timeout(void *eloop_ctx, void *user_ctx)
{
struct gas_server_response *response = eloop_ctx;
+ if (!response->resp && response->comeback_delay &&
+ !response->timeout_extended) {
+ response->timeout_extended = 1;
+ eloop_register_timeout(GAS_QUERY_TIMEOUT, 0,
+ gas_server_response_timeout,
+ response, user_ctx);
+ return;
+ }
+
wpa_printf(MSG_DEBUG, "GAS: Response @%p timeout for " MACSTR
" (dialog_token=%u freq=%d frag_id=%u sent=%lu/%lu) - drop pending data",
response, MAC2STR(response->dst), response->dialog_token,
--
2.43.0
More information about the Hostap
mailing list