From: Stefan Schantl Date: Sun, 3 Apr 2022 12:14:41 +0000 (+0200) Subject: rules.pl: Check if the blocklist is part of the settings hash. X-Git-Tag: v2.27-core170~4^2~149^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39eba7abab657959a3057a8cc0140f53db328f95;p=ipfire-2.x.git rules.pl: Check if the blocklist is part of the settings hash. Otherwise there will pop up some ugly notices on the command line and the logs. Signed-off-by: Stefan Schantl --- diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index b800e3063e..50feafa3be 100644 --- a/config/firewall/rules.pl +++ b/config/firewall/rules.pl @@ -740,7 +740,7 @@ sub ipblocklist () { # Loop through the array of blocklists. foreach my $blocklist (@blocklists) { # Skip disabled blocklists. - next unless($blocklistsettings{$blocklist} eq "on"); + next unless($blocklistsettings{$blocklist}) && ($blocklistsettings{$blocklist} eq "on")); # Call function to load the blocklist. &ipset_restore($blocklist);