]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: debug improvements
authorVictor Julien <victor@inliniac.net>
Wed, 8 Mar 2017 11:52:56 +0000 (12:52 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 20 Apr 2017 15:41:11 +0000 (17:41 +0200)
src/stream-tcp-list.c
src/stream-tcp-reassemble.c

index ce35bc04fe1c55c739cffd5e9251118de014103a..2a739c25c16c0d25a074b1fda051e10b31e9e401 100644 (file)
@@ -750,8 +750,8 @@ void StreamTcpPruneSession(Flow *f, uint8_t flags)
 
     if (stream->flags & STREAMTCP_STREAM_FLAG_DEPTH_REACHED) {
         stream->flags |= STREAMTCP_STREAM_FLAG_NOREASSEMBLY;
-        SCLogDebug("ssn %p: reassembly depth reached, "
-                 "STREAMTCP_STREAM_FLAG_NOREASSEMBLY set", ssn);
+        SCLogDebug("ssn %p / stream %p: reassembly depth reached, "
+                 "STREAMTCP_STREAM_FLAG_NOREASSEMBLY set", ssn, stream);
         StreamTcpReturnStreamSegments(stream);
         StreamingBufferClear(&stream->sb);
         return;
@@ -760,8 +760,8 @@ void StreamTcpPruneSession(Flow *f, uint8_t flags)
                 (stream->flags & STREAMTCP_STREAM_FLAG_GAP))     &&
                (stream->flags & STREAMTCP_STREAM_FLAG_DISABLE_RAW))
     {
-        SCLogDebug("ssn %p: both app and raw are done, "
-                 "STREAMTCP_STREAM_FLAG_NOREASSEMBLY set", ssn);
+        SCLogDebug("ssn %p / stream %p: both app and raw are done, "
+                 "STREAMTCP_STREAM_FLAG_NOREASSEMBLY set", ssn, stream);
         stream->flags |= STREAMTCP_STREAM_FLAG_NOREASSEMBLY;
         StreamTcpReturnStreamSegments(stream);
         StreamingBufferClear(&stream->sb);
index 5d4a067bc4ef5ba30d2637ec8e0cf3da64256c78..1fef7b233ee2244b627f7f0dafff0095d3e837cd 100644 (file)
@@ -1706,7 +1706,13 @@ int StreamTcpReassembleHandleSegment(ThreadVars *tv, TcpReassemblyThreadCtx *ra_
             SCReturnInt(-1);
         }
 
+        SCLogDebug("packet %"PRIu64" set PKT_STREAM_ADD", p->pcap_cnt);
         p->flags |= PKT_STREAM_ADD;
+    } else {
+        SCLogDebug("ssn %p / stream %p: not calling StreamTcpReassembleHandleSegmentHandleData:"
+                " p->payload_len %u, STREAMTCP_STREAM_FLAG_NOREASSEMBLY %s",
+                ssn, stream, p->payload_len,
+                (stream->flags & STREAMTCP_STREAM_FLAG_NOREASSEMBLY) ? "true" : "false");
     }
 
     /* in stream inline mode even if we have no data we call the reassembly