firewall: Suppress warning about uninitialized array in GeoIP code

Fixes #11597

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2018-01-22 13:20:04 +00:00
parent e0a048fe21
commit 1f91201011
2 changed files with 2 additions and 1 deletions

View 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");
}
}

View 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