From 93b120e70d807780c1c33320f5c3ba919050e197 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 27 Nov 2017 17:36:38 +0100 Subject: [PATCH] runmodes: config test is offline --- src/runmodes.c | 1 + src/util-conf.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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 {