]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Limit maximum number of pending SA Queries
authorJouni Malinen <j@w1.fi>
Sun, 22 Mar 2020 16:07:06 +0000 (18:07 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 22 Mar 2020 16:50:04 +0000 (18:50 +0200)
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 <j@w1.fi>
src/ap/sta_info.c

index 26885ea4998e92da4caf508b0599d282f1339c93..d3aa15da301a4a491e10b9d24c667c6d733abddb 100644 (file)
@@ -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,