]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unix-socket: fix alert metadata logging
authorAngelo Mirabella <amirabella@lastline.com>
Wed, 11 Mar 2020 15:11:19 +0000 (15:11 +0000)
committerVictor Julien <victor@inliniac.net>
Wed, 4 Nov 2020 15:30:18 +0000 (16:30 +0100)
This changeset fixes a bug that was preventing suricata to dump
alert metadata info when running in unix-socket mode.
When running in unix-socket mode, suricata was skipping the
initialization of the output modules and, as a consequence,
the metadata output module was never invoked.

src/suricata.c

index 108c4307db6d8dd1bbd5a581f24923c4635b965e..3d6faf15c8b660c9c6d3dfbf9736b65d6e8aa901 100644 (file)
@@ -2032,11 +2032,12 @@ void PreRunInit(const int runmode)
  * but after we dropped privs */
 void PreRunPostPrivsDropInit(const int runmode)
 {
+    StatsSetupPostConfigPreOutput();
+    RunModeInitializeOutputs();
+
     if (runmode == RUNMODE_UNIX_SOCKET)
         return;
 
-    StatsSetupPostConfigPreOutput();
-    RunModeInitializeOutputs();
     StatsSetupPostConfigPostOutput();
 }