From: Arne Fitzenreiter Date: Mon, 20 Apr 2015 21:14:11 +0000 (+0200) Subject: rules.pl: fix geoip initialisation. X-Git-Tag: v2.17-core91~116^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0505af9dc07f3a2b46d15e726d40585e4ee20099;p=people%2Fstevee%2Fipfire-2.x.git rules.pl: fix geoip initialisation. --- diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index 5358996114..daa95651bb 100644 --- a/config/firewall/rules.pl +++ b/config/firewall/rules.pl @@ -580,17 +580,15 @@ sub p2pblock { sub geoipblock { my %geoipsettings = (); + $geoipsettings{'GEOIPBLOCK_ENABLED'} = "off"; + + # Flush iptables chain. + run("$IPTABLES -F GEOIPBLOCK"); # Check if the geoip settings file exists if (-e "$geoipfile") { # Read settings file &General::readhash("$geoipfile", \%geoipsettings); - } else { - # Drop active rules. - run("$IPTABLES -F GEOIPBLOCK"); - - # Exit submodule, go on processing the remaining script - return; } # If geoip blocking is not enabled, we are finished here. @@ -602,9 +600,6 @@ sub geoipblock { # Get supported locations. my @locations = &fwlib::get_geoip_locations(); - # Flush iptables chain. - run("$IPTABLES -F GEOIPBLOCK"); - # Loop through all supported geoip locations and # create iptables rules, if blocking this country # is enabled.