]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: fix flow bucket timestamp optimization
authorVictor Julien <vjulien@oisf.net>
Mon, 16 Sep 2024 06:54:43 +0000 (08:54 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 10 Jan 2025 08:16:36 +0000 (09:16 +0100)
Flow Manager skips rows based on a minimized tracker that tracks the
next second at which the first flow may time out.

If seconds match a flow can still be timing out.

src/flow-hash.c

index e0f3a2e6d8c2d260bbd0852578826ae25f776036..77c74bb6e2013789e09041ee406c4a389c491db8 100644 (file)
@@ -908,7 +908,7 @@ Flow *FlowGetFlowFromHash(ThreadVars *tv, FlowLookupStruct *fls, Packet *p, Flow
         Flow *next_f = NULL;
         FLOWLOCK_WRLOCK(f);
         const bool timedout =
-                (fb_nextts < (uint32_t)SCTIME_SECS(p->ts) && FlowIsTimedOut(f, p->ts, emerg));
+                (fb_nextts <= (uint32_t)SCTIME_SECS(p->ts) && FlowIsTimedOut(f, p->ts, emerg));
         if (timedout) {
             next_f = f->next;
             MoveToWorkQueue(tv, fls, fb, f, prev_f);