[PATCH] gas_server: extend timeout for pending responses

Gustavo Bertoli gubertoli at gmail.com
Tue May 5 11:28:36 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.

Fix this by checking if the response is still pending and a comeback
delay is active. If so, reschedule the timeout to keep the entry alive.
This extends the Configurator's wait window safely, relying on the
Enrollee's own watchdog timer (120 seconds) to bound the session.

Signed-off-by: Gustavo Bertoli <gubertoli at gmail.com>
---
 src/common/gas_server.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/common/gas_server.c b/src/common/gas_server.c
index 52c14df36..8ec3b0df1 100644
--- a/src/common/gas_server.c
+++ b/src/common/gas_server.c
@@ -61,6 +61,18 @@ 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) {
+		wpa_printf(MSG_DEBUG,
+			   "GAS: Response @%p for " MACSTR
+			   " (dialog_token=%u) - response pending, extending timeout",
+			   response, MAC2STR(response->dst), response->dialog_token);
+
+		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