]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
output: don't register loggers for disabled protocols 2168/head
authorVictor Julien <victor@inliniac.net>
Wed, 6 Jul 2016 14:33:20 +0000 (16:33 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 6 Jul 2016 14:33:20 +0000 (16:33 +0200)
src/output-tx.c

index e94e418897f4597d05e1e674e39b39dbd9aa6ca2..a2a6e284e597a4f38e94d956bfd8c791f325865d 100644 (file)
@@ -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;