]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
firewall: Silence warnings if blocklist logging is not set.
authorStefan Schantl <stefan.schantl@ipfire.org>
Tue, 7 Mar 2023 12:17:34 +0000 (13:17 +0100)
committerPeter Müller <peter.mueller@ipfire.org>
Sat, 11 Mar 2023 16:27:31 +0000 (16:27 +0000)
Reference: #12979.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/firewall/rules.pl

index 1b628df169948f7771005c4a430334ef3af572a4..80985ca530ec68e8191334125f18649f7f5eb429 100644 (file)
@@ -761,7 +761,7 @@ sub ipblocklist () {
                        }
 
                        # Check if logging is enabled.
-                       if($blocklistsettings{'LOGGING'} eq "on") {
+                       if($blocklistsettings{'LOGGING'}) && ($blocklistsettings{'LOGGING'} eq "on")) {
                                # Create logging rule.
                                run("$IPTABLES -A ${blocklist}_DROP -j LOG -m limit --limit 10/second --log-prefix \"BLKLST_$blocklist \"");
                        }