]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
rules.pl: Check if the blocklist is part of the settings hash.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 3 Apr 2022 12:14:41 +0000 (14:14 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sat, 7 May 2022 09:38:19 +0000 (11:38 +0200)
Otherwise there will pop up some ugly notices on the command line and
the logs.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/firewall/rules.pl

index f5621529929279b43b34a72714dac07a00b98d5b..28accd4879853a90c3e85e289dc3825c4024132b 100644 (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);