From: Victor Julien Date: Mon, 27 Nov 2017 16:36:38 +0000 (+0100) Subject: runmodes: config test is offline X-Git-Tag: suricata-4.1.0-beta1~529 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93b120e70d807780c1c33320f5c3ba919050e197;p=thirdparty%2Fsuricata.git runmodes: config test is offline --- diff --git a/src/runmodes.c b/src/runmodes.c index 8b5c3ef03b..0f6fea80c9 100644 --- a/src/runmodes.c +++ b/src/runmodes.c @@ -487,6 +487,7 @@ int RunModeOutputFiledataEnabled(void) bool IsRunModeOffline(int run_mode_to_check) { switch(run_mode_to_check) { + case RUNMODE_CONF_TEST: case RUNMODE_PCAP_FILE: case RUNMODE_ERF_FILE: case RUNMODE_ENGINE_ANALYSIS: diff --git a/src/util-conf.c b/src/util-conf.c index 388a1541d8..8cec65ed24 100644 --- a/src/util-conf.c +++ b/src/util-conf.c @@ -25,6 +25,7 @@ #include "suricata-common.h" #include "config.h" #include "conf.h" +#include "runmodes.h" #include "util-conf.h" TmEcode ConfigSetLogDirectory(char *name) @@ -105,7 +106,7 @@ int ConfUnixSocketIsEnable(void) #ifdef OS_WIN32 return 0; #else - if (TimeModeIsLive()) { + if (!IsRunModeOffline(RunmodeGetCurrent())) { SCLogInfo("Running in live mode, activating unix socket"); return 1; } else {