From: Stefan Schantl Date: Mon, 9 Dec 2019 17:36:54 +0000 (+0100) Subject: firewall/rules.pl: Only try to export locations if needed. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=693b8513df290cbe4ee2fe3927ee029081fd2323;p=people%2Fstevee%2Fipfire-2.x.git firewall/rules.pl: Only try to export locations if needed. Signed-off-by: Stefan Schantl --- diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index c72b0129d0..57abbdf057 100644 --- a/config/firewall/rules.pl +++ b/config/firewall/rules.pl @@ -110,8 +110,11 @@ sub main { # Flush exported locations. &GeoIP::flush_exported_locations(); - # Export required locations. - &GeoIP::export_locations(\@locations_to_export); + # Check if there are any locations to export. + if (@locations_to_export) { + # Export required locations. + &GeoIP::export_locations(\@locations_to_export); + } # Prepare firewall rules. if (! -z "${General::swroot}/firewall/input"){