From ae7193611f69042436a9f4aaec56c0ff8f7a827a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 22 Mar 2020 18:07:06 +0200 Subject: [PATCH] Limit maximum number of pending SA Queries There is no point in starting a huge number of pending SA Queries, so limit the number of pending queries to 1000 to have an explicit limit for how large sa_query_count can grow. Signed-off-by: Jouni Malinen --- src/ap/sta_info.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index 26885ea49..d3aa15da3 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -1140,6 +1140,8 @@ static void ap_sa_query_timer(void *eloop_ctx, void *timeout_ctx) if (sta->sa_query_count > 0 && ap_check_sa_query_timeout(hapd, sta)) return; + if (sta->sa_query_count >= 1000) + return; nbuf = os_realloc_array(sta->sa_query_trans_id, sta->sa_query_count + 1,