]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
firewall: Suppress warning about uninitialized array in GeoIP code
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 22 Jan 2018 13:20:04 +0000 (13:20 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 22 Jan 2018 13:20:04 +0000 (13:20 +0000)
Fixes #11597

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/firewall/rules.pl
config/rootfiles/core/118/filelists/files

index 8b0c6ddc8e69ac06339c39e3a1aec11ca47f445f..9817634c84cf54f9e2c7baff33af0760e24051f9 100644 (file)
@@ -608,7 +608,7 @@ sub geoipblock {
        # create iptables rules, if blocking this country
        # is enabled.
        foreach my $location (@locations) {
-               if($geoipsettings{$location} eq "on") {
+               if(exists $geoipsettings{$location} && $geoipsettings{$location} eq "on") {
                        run("$IPTABLES -A GEOIPBLOCK -m geoip --src-cc $location -j DROP");
                }
        }
index c07489f9f0a0efa547e0b7e85d6680f09b887d09..f04bca68ca79e814aef3a0b3ec8d039043ee282d 100644 (file)
@@ -11,6 +11,7 @@ srv/web/ipfire/cgi-bin/fireinfo.cgi
 srv/web/ipfire/cgi-bin/ids.cgi
 srv/web/ipfire/cgi-bin/logs.cgi/showrequestfromcountry.dat
 srv/web/ipfire/cgi-bin/logs.cgi/urlfilter.dat
+usr/lib/firewall/rules.pl
 usr/local/bin/rebuild-initrd
 usr/local/bin/syslogdctrl
 usr/sbin/updxlrator