]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: be sure to check hash till the end
authorEric Leblond <el@stamus-networks.com>
Fri, 20 Aug 2021 08:42:13 +0000 (10:42 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 1 Sep 2021 10:21:50 +0000 (12:21 +0200)
(cherry picked from commit d7468c55ca4a8375ca6ca12396a4c61af6465041)

src/flow-manager.c

index b0b075a1bd08a21b1b9a100d371bc0f9873749ad..719d0fde26f071e0ccad7590a3fbe07c0c3c26ed 100644 (file)
@@ -551,8 +551,10 @@ static uint32_t FlowTimeoutHashInChunks(FlowManagerTimeoutThread *td,
 
     const uint32_t min = iter * chunk_size + hash_min;
     uint32_t max = min + chunk_size;
+    /* we start at beginning of hash at next iteration so let's check
+     * hash till the end */
     if (iter + 1 == chunks) {
-        max = rows;
+        max = hash_max;
     }
     const uint32_t cnt = FlowTimeoutHash(td, ts, min, max, counters);
     return cnt;