From abe8dfc56b505fdb706f154856d5b1eccc0c3da1 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 16 Sep 2024 08:54:43 +0200 Subject: [PATCH] flow: fix flow bucket timestamp optimization 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flow-hash.c b/src/flow-hash.c index e0f3a2e6d8..77c74bb6e2 100644 --- a/src/flow-hash.c +++ b/src/flow-hash.c @@ -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);