]> 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 06:33:52 +0000 (08:33 +0200)
src/flow-manager.c

index 503785b4bf23189195fc41437c99944f836aed31..c142e75c3f1b8f9b55af360f740679b9e08678d8 100644 (file)
@@ -561,8 +561,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;