]> git.openstreetmap.org Git - dns.git/blobdiff - bin/mkgeo
Point UK taginfo instance at new server
[dns.git] / bin / mkgeo
index bd5bfbb9ccb3a0f7fe6547eab70eecc97f3cc30b..1b9f87f0fb08a9aa7c52d2fa97320332b2037cf9 100755 (executable)
--- a/bin/mkgeo
+++ b/bin/mkgeo
@@ -292,8 +292,20 @@ sub match_origin
     my $match;
 
     if ($cluster->{preferred} &&
-        $cluster->{preferred}->{countries} &&
-        grep { $_ eq $origin->{country} } @{$cluster->{preferred}->{countries}})
+        $cluster->{preferred}->{origins} &&
+        grep { $_ eq $origin->{name} } @{$cluster->{preferred}->{origins}})
+    {
+        $match = "preferred";
+    }
+    elsif ($cluster->{allowed} &&
+           $cluster->{allowed}->{origins} &&
+           grep { $_ eq $origin->{name} } @{$cluster->{allowed}->{origins}})
+    {
+        $match = "allowed";
+    }
+    elsif ($cluster->{preferred} &&
+           $cluster->{preferred}->{countries} &&
+           grep { $_ eq $origin->{country} } @{$cluster->{preferred}->{countries}})
     {
         $match = "preferred";
     }