X-Git-Url: https://git.openstreetmap.org./dns.git/blobdiff_plain/b4355de5fdb416e8be94eabc8e084c4a4a1ea040..b2c5ec8ad66c3c2070a509e79a87e92727280bb3:/bin/mkgeo diff --git a/bin/mkgeo b/bin/mkgeo index bd5bfbb..1b9f87f 100755 --- 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"; }