]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow-worker: prune frames and stream for pseudo packets as well
authorVictor Julien <vjulien@oisf.net>
Mon, 5 Sep 2022 08:56:19 +0000 (10:56 +0200)
committerVictor Julien <vjulien@oisf.net>
Tue, 17 Jan 2023 13:25:06 +0000 (14:25 +0100)
src/flow-worker.c

index 1363e27b88e62192fb53183f1756fae5006e3fed..c659fe39560241b6f97970730a7aba6ca70952d0 100644 (file)
@@ -399,6 +399,13 @@ static inline void FlowWorkerStreamTCPUpdate(ThreadVars *tv, FlowWorkerThreadDat
 
         OutputLoggerLog(tv, x, fw->output_thread);
 
+        FramesPrune(x->flow, x);
+        /*  Release tcp segments. Done here after alerting can use them. */
+        FLOWWORKER_PROFILING_START(x, PROFILE_FLOWWORKER_TCPPRUNE);
+        StreamTcpPruneSession(
+                x->flow, x->flowflags & FLOW_PKT_TOSERVER ? STREAM_TOSERVER : STREAM_TOCLIENT);
+        FLOWWORKER_PROFILING_END(x, PROFILE_FLOWWORKER_TCPPRUNE);
+
         if (timeout) {
             PacketPoolReturnPacket(x);
         } else {