From 6a3621f2fe3bee73752861870f5e7be6c17f0f0f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 6 Jan 2014 14:09:35 +0100 Subject: [PATCH] Error out if -s/-S are used with disable detect When Suricata is started with --disabled-detection, the -s and -S options make no sense. So error out. --- src/suricata.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/suricata.c b/src/suricata.c index 09404c4cb8..f5ad18581b 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -1523,6 +1523,11 @@ static TmEcode ParseCommandLine(int argc, char** argv, SCInstance *suri) } } + if (suri->disabled_detect && suri->sig_file != NULL) { + SCLogError(SC_ERR_INITIALIZATION, "can't use -s/-S when detection is disabled"); + return TM_ECODE_FAILED; + } + if (list_app_layer_protocols) suri->run_mode = RUNMODE_LIST_APP_LAYERS; if (list_cuda_cards)