From: Victor Julien Date: Mon, 25 Oct 2021 17:14:49 +0000 (+0200) Subject: flow/worker: run housekeeping for bypassed packets X-Git-Tag: suricata-7.0.0-beta1~1283 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab8f289bb652a2aa83bdd476708a5f297cbec83c;p=thirdparty%2Fsuricata.git flow/worker: run housekeeping for bypassed packets Run flow eviction and flow inject queues for bypassed packets as well, to avoid a scenario where these won't get run at all if too much of the traffic is bypassed. Bug: #4779. --- diff --git a/src/flow-worker.c b/src/flow-worker.c index fbad567142..b84ec58db0 100644 --- a/src/flow-worker.c +++ b/src/flow-worker.c @@ -509,7 +509,7 @@ static TmEcode FlowWorker(ThreadVars *tv, Packet *p, void *data) if (likely(p->flow != NULL)) { DEBUG_ASSERT_FLOW_LOCKED(p->flow); if (FlowUpdate(tv, fw, p) == TM_ECODE_DONE) { - return TM_ECODE_OK; + goto housekeeping; } } /* Flow is now LOCKED */ @@ -584,6 +584,8 @@ static TmEcode FlowWorker(ThreadVars *tv, Packet *p, void *data) FLOWLOCK_UNLOCK(f); } +housekeeping: + /* take injected flows and process them */ FlowWorkerProcessInjectedFlows(tv, fw, p, detect_thread);