proto-detect: add debug output

pull/2693/head
Victor Julien 9 years ago
parent b8d13f354b
commit 893f868b42

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

Loading…
Cancel
Save