]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stats: Track stream reassembly drops 9521/head 9529/head
authorJeff Lucovsky <jlucovsky@oisf.net>
Tue, 22 Aug 2023 14:17:24 +0000 (10:17 -0400)
committerJeff Lucovsky <jlucovsky@oisf.net>
Tue, 26 Sep 2023 14:36:00 +0000 (10:36 -0400)
Issue: 6235
(cherry picked from commit 904f0ddeeeb1bdb4a686f991cf090a47dd84249e)

src/decode.c
src/decode.h
src/stream-tcp-reassemble.c

index 8d0e3feb2e0366ff37351594ae04817258b34ed0..45301f78d715fb014b1e71966e9d6a27c0df6365 100644 (file)
@@ -794,6 +794,8 @@ const char *PacketDropReasonToString(enum PacketDropReason r)
             return "stream memcap";
         case PKT_DROP_REASON_STREAM_MIDSTREAM:
             return "stream midstream";
+        case PKT_DROP_REASON_STREAM_REASSEMBLY:
+            return "stream reassembly";
         case PKT_DROP_REASON_APPLAYER_ERROR:
             return "applayer error";
         case PKT_DROP_REASON_APPLAYER_MEMCAP:
index 91029fa1f146b5c2aa6f3dbed9b1c8e60acd0782..a77c7c7f18cad8102ca8a189f8bddb1f04031558 100644 (file)
@@ -411,6 +411,7 @@ enum PacketDropReason {
     PKT_DROP_REASON_STREAM_ERROR,
     PKT_DROP_REASON_STREAM_MEMCAP,
     PKT_DROP_REASON_STREAM_MIDSTREAM,
+    PKT_DROP_REASON_STREAM_REASSEMBLY,
 };
 
 /* forward declaration since Packet struct definition requires this */
index 9ba06f563fd52dcd8720860e4d2a7423faac79e3..325448bd4eb2b60970eb1078d86366f73bdb5a35 100644 (file)
@@ -1903,7 +1903,7 @@ int StreamTcpReassembleHandleSegment(ThreadVars *tv, TcpReassemblyThreadCtx *ra_
             SCLogDebug("StreamTcpReassembleHandleSegmentHandleData error");
             /* failure can only be because of memcap hit, so see if this should lead to a drop */
             ExceptionPolicyApply(
-                    p, stream_config.reassembly_memcap_policy, PKT_DROP_REASON_STREAM_MEMCAP);
+                    p, stream_config.reassembly_memcap_policy, PKT_DROP_REASON_STREAM_REASSEMBLY);
             SCReturnInt(-1);
         }