]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: flag TCP streams with gap
authorEric Leblond <el@stamus-networks.com>
Tue, 23 Mar 2021 22:06:41 +0000 (23:06 +0100)
committerVictor Julien <vjulien@oisf.net>
Mon, 3 Oct 2022 09:03:04 +0000 (11:03 +0200)
src/stream-tcp-private.h
src/stream-tcp-reassemble.c

index e817533d7a1d22f2eedaec93c8c14fe4b40ca8d7..2a7b124223f817db95081b19ada6e2a801432060 100644 (file)
@@ -206,7 +206,8 @@ enum TcpState {
  * Per STREAM flags
  */
 
-// bit 0 vacant
+/** Flag to indicate that we have seen gap on the stream */
+#define STREAMTCP_STREAM_FLAG_HAS_GAP BIT_U16(0)
 /** Flag to avoid stream reassembly/app layer inspection for the stream */
 #define STREAMTCP_STREAM_FLAG_NOREASSEMBLY                  BIT_U16(1)
 /** we received a keep alive */
index 5f4032cc30c4cd7011576bfe17933408f4a756a0..e6f7fbaf8d9cc1c49431d5bac83b1afa3ffadd8a 100644 (file)
@@ -1213,6 +1213,7 @@ static int ReassembleUpdateAppLayer (ThreadVars *tv,
             AppLayerProfilingStore(ra_ctx->app_tctx, p);
 
             StreamTcpSetEvent(p, STREAM_REASSEMBLY_SEQ_GAP);
+            (*stream)->flags |= STREAMTCP_STREAM_FLAG_HAS_GAP;
             StatsIncr(tv, ra_ctx->counter_tcp_reass_gap);
             ssn->lossy_be_liberal = true;