]> git.openstreetmap.org Git - dns.git/commitdiff
Process all country rules before continent rules
authorTom Hughes <tom@compton.nu>
Wed, 6 Aug 2014 08:39:29 +0000 (09:39 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 6 Aug 2014 08:39:29 +0000 (09:39 +0100)
bin/mkgeo

index bf5ca4d6ba578767694b8da147f255c8b9ca43f7..7b70c2240020ebdd007ed2f08547225702b66fa6 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -273,30 +273,30 @@ sub match_origin
     {
         $match = "preferred";
     }
-    elsif ($cluster->{preferred} &&
-           $cluster->{preferred}->{continents} &&
-           grep { $_ eq $origin->{continent} } @{$cluster->{preferred}->{continents}})
-    {
-        $match = "preferred";
-    }
     elsif ($cluster->{allowed} &&
            $cluster->{allowed}->{countries} &&
            grep { $_ eq $origin->{country} } @{$cluster->{allowed}->{countries}})
     {
         $match = "allowed";
     }
-    elsif ($cluster->{allowed} &&
-           $cluster->{allowed}->{continents} &&
-           grep { $_ eq $origin->{continent} } @{$cluster->{allowed}->{continents}})
-    {
-        $match = "allowed";
-    }
     elsif ($cluster->{denied} &&
            $cluster->{denied}->{countries} &&
            grep { $_ eq $origin->{country} } @{$cluster->{denied}->{countries}})
     {
         $match = "denied";
     }
+    elsif ($cluster->{preferred} &&
+           $cluster->{preferred}->{continents} &&
+           grep { $_ eq $origin->{continent} } @{$cluster->{preferred}->{continents}})
+    {
+        $match = "preferred";
+    }
+    elsif ($cluster->{allowed} &&
+           $cluster->{allowed}->{continents} &&
+           grep { $_ eq $origin->{continent} } @{$cluster->{allowed}->{continents}})
+    {
+        $match = "allowed";
+    }
     elsif ($cluster->{denied} &&
            $cluster->{denied}->{continents} &&
            grep { $_ eq $origin->{continent} } @{$cluster->{denied}->{continents}})