]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
datasets: Init even in socket mode
authorShivani Bhardwaj <shivanib134@gmail.com>
Mon, 3 Aug 2020 16:41:40 +0000 (22:11 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 4 Aug 2020 09:23:38 +0000 (11:23 +0200)
Closes redmine ticket 3476.

src/suricata.c

index 3def54f0b008d4c43f959a94657fa3b2d71fde89..41e1109e4929cda70cb5d2f39fc344f1751e4718 100644 (file)
@@ -1990,6 +1990,8 @@ static int InitSignalHandler(SCInstance *suri)
  * Will be run once per pcap in unix-socket mode */
 void PreRunInit(const int runmode)
 {
+    /* Initialize Datasets to be able to use them with unix socket */
+    DatasetsInit();
     if (runmode == RUNMODE_UNIX_SOCKET)
         return;
 
@@ -2001,7 +2003,6 @@ void PreRunInit(const int runmode)
     SCProfilingSghsGlobalInit();
     SCProfilingInit();
 #endif /* PROFILING */
-    DatasetsInit();
     DefragInit();
     FlowInitConfig(FLOW_QUIET);
     IPPairInitConfig(FLOW_QUIET);