summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2014-10-19 21:01:53 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2014-10-19 21:01:53 (GMT)
commit8e38121f066cfde244782b05416f10e41803dd4c (patch) (side-by-side diff)
treec9bb51d0e72ec0f11bce36e3edecdc6465dac77b
parent44bf6638158e4171b33fcdf9183a9e6c132518dc (diff)
downloaddnstools-8e38121f066cfde244782b05416f10e41803dd4c.tar.gz
dnstools-8e38121f066cfde244782b05416f10e41803dd4c.tar.bz2
whoseip: a kludge
* whoseip/whoseip.pl (ripe_decode): Handle networks transferred to another region.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--whoseip/whoseip.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/whoseip/whoseip.pl b/whoseip/whoseip.pl
index 2464155..87974f6 100644
--- a/whoseip/whoseip.pl
+++ b/whoseip/whoseip.pl
@@ -250,6 +250,12 @@ sub ripe_decode {
$ref->{cidr} = join ',', Net::CIDR::range2cidr($r);
} elsif ($input =~ /^country:\s+(.+)/) {
$ref->{country} = $1;
+ } elsif ($input =~ /^netname:\s+(.+)-TRANSFERRED.*/) {
+ # A kludge to handle networks transferred to another RIR
+ # E.g.: netname: AFRINIC-NET-TRANSFERRED-20050223
+ my $s = $1;
+ $s =~ s/-/./g;
+ $ref->{referto} = "whois.$s:43";
} elsif ($input eq '') {
$ref->{state} = RIPE_IGNR;
}

Return to:

Send suggestions and report system problems to the System administrator.