]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/ids.cgi
ids.cgi: Fix check and message when trying to enable suricata without
[ipfire-2.x.git] / html / cgi-bin / ids.cgi
index 2ebc78f78e026595567d6b0fe08530b8c9926174..4ed2c6fa08bf258893266b1f2235490959d64c73 100644 (file)
@@ -530,9 +530,12 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'ids apply'}) {
 
        # Check if the IDS should be enabled.
        if ($cgiparams{'ENABLE_IDS'} eq "on") {
+               # Get enabled providers.
+               my @enabled_providers = &IDS::get_enabled_providers();
+
                # Check if any ruleset is available. Otherwise abort and display an error.
-               unless(%used_providers) {
-                       $errormessage = $Lang::tr{'ids no ruleset available'};
+               unless(@enabled_providers) {
+                       $errormessage = $Lang::tr{'ids no enabled ruleset provider'};
                }
 
                # Loop through the array of available interfaces.