firewall: Silence warnings if blocklist logging is not set.

Reference: #12979.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2023-03-07 13:17:34 +01:00
committed by Peter Müller
parent b80932932a
commit 1b70ead36d

View 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 \"");
}