]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
proto-detect: add debug output
authorVictor Julien <victor@inliniac.net>
Fri, 17 Feb 2017 10:43:02 +0000 (11:43 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 8 May 2017 08:43:36 +0000 (10:43 +0200)
src/app-layer.c

index 73d74167c28d8286ac9961537560dbf447f38e32..5684075febb7919aff36e27ad613170c4bd29256 100644 (file)
@@ -564,12 +564,16 @@ int AppLayerHandleTCPData(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx,
         }
     } else if (alproto != ALPROTO_UNKNOWN && FlowChangeProto(f)) {
         f->alproto_orig = f->alproto;
+        SCLogDebug("protocol change, old %s", AppProtoToString(f->alproto_orig));
         AppLayerProtoDetectReset(f);
         /* rerun protocol detection */
         if (TCPProtoDetect(tv, ra_ctx, app_tctx, p, f, ssn, stream,
                            data, data_len, flags) != 0) {
+            SCLogDebug("proto detect failure");
             goto failure;
         }
+        SCLogDebug("protocol change, old %s, new %s",
+                AppProtoToString(f->alproto_orig), AppProtoToString(f->alproto));
     } else {
         SCLogDebug("stream data (len %" PRIu32 " alproto "
                    "%"PRIu16" (flow %p)", data_len, f->alproto, f);