Subject: | IPv6 Support |
Although partial coding is done for IPv6 address lookups, they don't work.
Attached is a patch to enable it with a little bit more than just /:/
checking for is_ip6addr.
Subject: | ipv6-enabled.patch |
diff -Naur Net-Whois-Raw-2.33.orig//lib/Net/Whois/Raw/Common.pm Net-Whois-Raw-2.33/lib/Net/Whois/Raw/Common.pm
--- Net-Whois-Raw-2.33.orig//lib/Net/Whois/Raw/Common.pm 2011-06-30 18:33:52.000000000 -0400
+++ Net-Whois-Raw-2.33/lib/Net/Whois/Raw/Common.pm 2011-06-30 18:32:22.000000000 -0400
@@ -193,7 +193,7 @@
my ($dom) = @_;
my $tld;
- if ( is_ipaddr($dom) ) {
+ if ( is_ipaddr($dom) || is_ip6addr($dom) ) {
$tld = "IP";
}
elsif ( domain_level($dom) == 1 ) {
@@ -653,7 +653,7 @@
# check, if it's IPv6-address?
sub is_ip6addr {
# TODO: bad implementation!!!!!
- $_[0] =~ /:/;
+ $_[0] =~ /^[0-9a-f]{1-4}:/;
}
# get domain level