From ed483b4e13c441abac7b1c1ad363e27bcaff3fa7 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 6 Jul 2016 16:33:20 +0200 Subject: [PATCH] output: don't register loggers for disabled protocols --- src/output-tx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/output-tx.c b/src/output-tx.c index e94e418897..a2a6e284e5 100644 --- a/src/output-tx.c +++ b/src/output-tx.c @@ -67,6 +67,12 @@ int OutputRegisterTxLogger(const char *name, AppProto alproto, TxLogger LogFunc, if (module_id < 0) return -1; + if (!(AppLayerParserIsTxAware(alproto))) { + SCLogNotice("%s logger not enabled: protocol %s is disabled", + name, AppProtoToString(alproto)); + return -1; + } + OutputTxLogger *op = SCMalloc(sizeof(*op)); if (op == NULL) return -1; -- 2.47.2