From 1b70ead36dfaf6541677e4ac5d05867273eaa265 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Tue, 7 Mar 2023 13:17:34 +0100 Subject: [PATCH] firewall: Silence warnings if blocklist logging is not set. Reference: #12979. Signed-off-by: Stefan Schantl --- config/firewall/rules.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index 1b628df169..80985ca530 100644 --- a/config/firewall/rules.pl +++ b/config/firewall/rules.pl @@ -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 \""); } -- 2.39.5