[1/2] firewall: Silence warnings if blocklist logging is not set.
Commit Message
Reference: #12979.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
config/firewall/rules.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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 \"");
}