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 <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2022-04-03 14:14:41 +02:00
parent 733267f35a
commit 39eba7abab

View File

@@ -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);