]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve-http: register with app-layer api 890/head
authorVictor Julien <victor@inliniac.net>
Wed, 12 Mar 2014 08:31:34 +0000 (09:31 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 12 Mar 2014 08:31:34 +0000 (09:31 +0100)
The HTTP module of Eve didn't register itself with the app-layer
for HTTP. This meant that if no other HTTP logger was active, the
HTTP logging in Eve wouldn't work.

This patch makes the HTTP Eve module register itself correctly.

Bug #1133.

src/output-json-http.c

index f0649b3fc030174fe6bc0ddbe82fcf6db5e55b3f..7aca281fdeaaaecd622526196f0e995ab98c29b0 100644 (file)
@@ -274,6 +274,9 @@ OutputCtx *OutputHttpLogInit(ConfNode *conf)
     output_ctx->data = http_ctx;
     output_ctx->DeInit = NULL;
 
+    /* enable the logger for the app layer */
+    AppLayerParserRegisterLogger(IPPROTO_TCP, ALPROTO_HTTP);
+
     return output_ctx;
 }
 
@@ -306,6 +309,9 @@ OutputCtx *OutputHttpLogInitSub(ConfNode *conf, OutputCtx *parent_ctx)
     output_ctx->data = http_ctx;
     output_ctx->DeInit = NULL;
 
+    /* enable the logger for the app layer */
+    AppLayerParserRegisterLogger(IPPROTO_TCP, ALPROTO_HTTP);
+
     return output_ctx;
 }