]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Error out if -s/-S are used with disable detect
authorVictor Julien <victor@inliniac.net>
Mon, 6 Jan 2014 13:09:35 +0000 (14:09 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 27 Jan 2014 12:22:48 +0000 (13:22 +0100)
When Suricata is started with --disabled-detection, the -s and -S
options make no sense. So error out.

src/suricata.c

index 09404c4cb859ed2d0f56b202f45846f9d4d3a0fe..f5ad18581b2f870ed1ee3709b7cd42c3f125d6e2 100644 (file)
@@ -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)