]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow/worker: run housekeeping for bypassed packets
authorVictor Julien <victor@inliniac.net>
Mon, 25 Oct 2021 17:14:49 +0000 (19:14 +0200)
committerVictor Julien <victor@inliniac.net>
Sat, 30 Oct 2021 06:36:27 +0000 (08:36 +0200)
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.

src/flow-worker.c

index fbad5671427ffa3d6480eaf906ce72a661b6d183..b84ec58db0ba668cd15cb5d28cb51a1cee42dc19 100644 (file)
@@ -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);