]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
firewall/rules.pl: Only try to export locations if needed.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 9 Dec 2019 17:36:54 +0000 (18:36 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Mon, 9 Dec 2019 17:36:54 +0000 (18:36 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/firewall/rules.pl

index c72b0129d072f8953789f726752ebf509aa5925b..57abbdf057d1645b522bc8af51b550326fcfdde3 100644 (file)
@@ -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"){