stats: Track stream reassembly drops

Issue: 6235
(cherry picked from commit 904f0ddeee)
pull/9529/head
Jeff Lucovsky 3 years ago
parent eb38c3332d
commit d1bd80fce6

@ -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:

@ -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 */

@ -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);
}

Loading…
Cancel
Save