From: Jouni Malinen Date: Sun, 22 Mar 2020 16:07:06 +0000 (+0200) Subject: Limit maximum number of pending SA Queries X-Git-Tag: hostap_2_10~1586 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae7193611f69042436a9f4aaec56c0ff8f7a827a;p=thirdparty%2Fhostap.git 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 --- 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,