]> git.ipfire.org Git - people/pmueller/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>
Thu, 7 Jul 2022 15:26:14 +0000 (17:26 +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 b800e3063ec4eb7bf9cf760db0b75001bf9ee9de..50feafa3bee11d5d3f3f0b217851ca7724ed6dca 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);