Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Net-Whois-Raw CPAN distribution.

Report information
The Basics
Id: 107218
Status: resolved
Priority: 0/
Queue: Net-Whois-Raw

People
Owner: Nobody in particular
Requestors: hsalgado [...] vulcano.cl
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: IPv6 support
Hi. I wonder if you have in the roadmap adding IPv6 support for this module. I'm using it actively for monitoring reasons, and I have proof-of-concept patch that works pretty well. It's just loading IO::Socket::INET6 and some address mangling for the serverparams array. It's not production ready, but I can send you my working code. Thanks, Hugo
Hello. We do not have this roadmap at the moment. The module can handle whois requests of IPv6 addresses, but can not take IPv6 addresses as whois server addresses. I think this should be fixed first. ok: perl -MNet::Whois::Raw -E 'say whois "2606:2800:220:1:248:1893:25c8:1946", "199.212.0.46"' not ok: perl -MNet::Whois::Raw -E 'say whois "2606:2800:220:1:248:1893:25c8:1946", "2001:500:31::46"' 2001:500:31::46: Invalid argument: 2001:500:31::46 at /usr/local/share/perl/5.14.2/Net/Whois/Raw.pm line 300 If you have the patch, please make a pull request here https://github.com/regru/Net-Whois-Raw On Mon Sep 21 09:49:24 2015, HUGUEI wrote: Show quoted text
> Hi. I wonder if you have in the roadmap adding IPv6 support for this > module. > I'm using it actively for monitoring reasons, and I have proof-of- > concept patch that works pretty well. It's just loading > IO::Socket::INET6 and some address mangling for the serverparams > array. It's not production ready, but I can send you my working code. > > Thanks, > > Hugo
On Mon Sep 21 10:12:00 2015, NALOBIN wrote: Show quoted text
> > not ok: > perl -MNet::Whois::Raw -E 'say whois > "2606:2800:220:1:248:1893:25c8:1946", "2001:500:31::46"' > 2001:500:31::46: Invalid argument: 2001:500:31::46 at > /usr/local/share/perl/5.14.2/Net/Whois/Raw.pm line 300 >
Yes, sorry. That's what I meant. IPv6 at server. I'm attaching my patch. As I said is not ready for production (fixed port, checking address via regex, etc) but it could serve as start point. I promise to fork the project in github and work in a complete solution ASAP. The patch is against 2.86 version. Hugo
Subject: Net-Whois-Raw.pm.patch
--- ./blib/lib/Net/Whois/Raw.pm 2015-09-21 10:22:58.134486217 -0300 +++ /usr/local/share/perl5/Net/Whois/Raw.pm 2015-09-21 10:51:42.930454346 -0300 @@ -9,6 +9,7 @@ use Carp; use IO::Socket; +use IO::Socket::INET6; use Encode; use utf8; @@ -295,7 +296,13 @@ $prev_alarm = alarm $TIMEOUT if $TIMEOUT; unless($sock){ - $sock = IO::Socket::INET->new(@sockparams) || die "$srv: $!: ".join(', ', @sockparams); + if ($srv =~ /:/) { + @sockparams = (PeerAddr=>$srv, PeerPort=>'43'); + $sock = IO::Socket::INET6->new(@sockparams) || die "$srv: $!: ".join(', ', @sockparams); + } + else { + $sock = IO::Socket::INET->new(@sockparams) || die "$srv: $!: ".join(', ', @sockparams); + } } if ($class->can ('whois_socket_fixup')) {
BTW checking can be done with Net::Whois::Raw::Common::is_ip6addr On Mon Sep 21 10:50:18 2015, HUGUEI wrote: Show quoted text
> > On Mon Sep 21 10:12:00 2015, NALOBIN wrote:
> > > > not ok: > > perl -MNet::Whois::Raw -E 'say whois > > "2606:2800:220:1:248:1893:25c8:1946", "2001:500:31::46"' > > 2001:500:31::46: Invalid argument: 2001:500:31::46 at > > /usr/local/share/perl/5.14.2/Net/Whois/Raw.pm line 300 > >
> > Yes, sorry. That's what I meant. IPv6 at server. > > I'm attaching my patch. As I said is not ready for production (fixed > port, checking address via regex, etc) but it could serve as start > point. > > I promise to fork the project in github and work in a complete > solution ASAP. > > The patch is against 2.86 version. > > Hugo
Pull request created in github. Thanks. Hugo On Mon Sep 21 11:20:33 2015, NALOBIN wrote: Show quoted text
> BTW checking can be done with Net::Whois::Raw::Common::is_ip6addr > > > On Mon Sep 21 10:50:18 2015, HUGUEI wrote:
> > > > On Mon Sep 21 10:12:00 2015, NALOBIN wrote:
> > > > > > not ok: > > > perl -MNet::Whois::Raw -E 'say whois > > > "2606:2800:220:1:248:1893:25c8:1946", "2001:500:31::46"' > > > 2001:500:31::46: Invalid argument: 2001:500:31::46 at > > > /usr/local/share/perl/5.14.2/Net/Whois/Raw.pm line 300 > > >
> > > > Yes, sorry. That's what I meant. IPv6 at server. > > > > I'm attaching my patch. As I said is not ready for production (fixed > > port, checking address via regex, etc) but it could serve as start > > point. > > > > I promise to fork the project in github and work in a complete > > solution ASAP. > > > > The patch is against 2.86 version. > > > > Hugo
> >