]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Kill engine during init stage if it fails to load valid value for sgh-mpm-context
authorAnoop Saldanha <poonaatsoc@gmail.com>
Fri, 22 Jun 2012 09:01:10 +0000 (14:31 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 26 Jun 2012 07:36:10 +0000 (09:36 +0200)
src/detect-engine.c

index e36ad5fc7df58a56e9a41f6af24becbd35f8a823..10f63cdbda9568c35a1e6a28c20bed7eb70d0600 100644 (file)
@@ -238,8 +238,10 @@ static uint8_t DetectEngineCtxLoadConf(DetectEngineCtx *de_ctx) {
         } else if (strcmp(sgh_mpm_context, "full") == 0) {
             de_ctx->sgh_mpm_context = ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL;
         } else {
-           SCLogWarning(SC_ERR_INVALID_YAML_CONF_ENTRY, "invalid conf value "
-                   "for detect-engine.sgh-mpm-context -- %s", sgh_mpm_context);
+           SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, "You have supplied an "
+                      "invalid conf value for detect-engine.sgh-mpm-context-"
+                      "%s", sgh_mpm_context);
+           exit(EXIT_FAILURE);
         }
     }