]> git.ipfire.org Git - people/stevee/guardian.git/blobdiff - modules/Config.pm
Set default FirewallEngine to "none".
[people/stevee/guardian.git] / modules / Config.pm
index 569b2ceb99da109242265b772d13e66eff9f6795..8da587cde15eb3357add35718f18d1b5ccdce708 100644 (file)
@@ -18,6 +18,7 @@ my %defaults = (
        "LogFacility" => "syslog",
        "BlockCount" => "3",
        "BlockTime" => "86400",
+       "FirewallEngine" => "none",
 );
 
 #
@@ -153,7 +154,13 @@ sub CheckConfig (\%) {
                }
        }
 
-       # XXX - add check for validating the configured loglevel.
+       # Gather details about supported log levels.
+       my %supported_loglevels = &Guardian::Logger::GetLogLevels();
+
+       # Check if the configured log level is valid.
+       unless (exists ($supported_loglevels{$config{LogLevel}})) {
+               return "Invalid LogLevel: $config{LogLevel}";
+       }
 
        # The config looks good, so return nothing (no error message).
        return undef