From: Victor Julien Date: Fri, 17 Feb 2017 10:43:02 +0000 (+0100) Subject: proto-detect: add debug output X-Git-Tag: suricata-4.0.0-beta1~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=893f868b4282e8eaeda35d81b8e0f40ec2f374e5;p=thirdparty%2Fsuricata.git proto-detect: add debug output --- diff --git a/src/app-layer.c b/src/app-layer.c index 73d74167c2..5684075feb 100644 --- a/src/app-layer.c +++ b/src/app-layer.c @@ -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);