From: Victor Julien Date: Wed, 10 May 2023 05:02:27 +0000 (+0200) Subject: flowworker: flush local work queue on capture timeout X-Git-Tag: suricata-7.0.0-rc2~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d333dffdcb3f28e5a0b45d7bd14accbea153c4aa;p=thirdparty%2Fsuricata.git flowworker: flush local work queue on capture timeout Capture timeout means no packets have been received for some time, so this is a good time to flush out all work. --- diff --git a/src/flow-worker.c b/src/flow-worker.c index 3b122c7246..aad47df982 100644 --- a/src/flow-worker.c +++ b/src/flow-worker.c @@ -485,7 +485,7 @@ static inline void FlowWorkerProcessInjectedFlows( static inline void FlowWorkerProcessLocalFlows(ThreadVars *tv, FlowWorkerThreadData *fw, Packet *p) { uint32_t max_work = 2; - if (p->pkt_src == PKT_SRC_SHUTDOWN_FLUSH) + if (p->pkt_src == PKT_SRC_SHUTDOWN_FLUSH || p->pkt_src == PKT_SRC_CAPTURE_TIMEOUT) max_work = 0; FLOWWORKER_PROFILING_START(p, PROFILE_FLOWWORKER_FLOW_EVICTED);