From: Victor Julien Date: Mon, 16 Sep 2024 06:54:43 +0000 (+0200) Subject: flow: fix flow bucket timestamp optimization X-Git-Tag: suricata-8.0.0-beta1~590 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=abe8dfc56b505fdb706f154856d5b1eccc0c3da1;p=thirdparty%2Fsuricata.git 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. --- 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);