Skip Menu |

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

Report information
The Basics
Id: 15947
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: berni [...] birkenwald.de
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.53_02
Fixed in: (no value)



Subject: IPv6 broken
Revision 497 broke IPv6 support for Net::DNS::Nameserver my $ns = Net::DNS::Nameserver->new( LocalAddr => '2001:1b10:100:3::1:2', LocalPort => 5353, ReplyHandler => \&reply_handler) results in Bad arg length for Socket::inet_ntoa, length is 20, should be 4 at lib/Net/DNS/Nameserver.pm line 93. Commenting out both inet_ntoa in line 93 and 97 makes it work again. I'm not really sure what these line should do. Worked fine with 0.53. FTR, not really needed here: Net::DNS 0.53_02 or SVN trunk Perl 5.8.7 Debian unstable Linux 2.6.13
From: "Olaf M. Kolkman" <olaf [...] dacht.net>
Subject: Re: [cpan #15947] IPv6 broken
Date: Sat, 19 Nov 2005 10:27:04 +0100
To: bug-Net-DNS [...] rt.cpan.org
RT-Send-Cc:
I do not have V6 connectivity at this very moment. But this patch should do it. Would you be willing to try? --Olaf --- lib/Net/DNS/Nameserver.pm (revision 512) +++ lib/Net/DNS/Nameserver.pm (working copy) @@ -19,8 +19,8 @@ use constant STATE_ACCEPTED => 1; use constant STATE_GOT_LENGTH => 2; use constant STATE_SENDING => 3; +use Net::IP qw(ip_is_ipv4 ip_is_ipv6 ip_normalize); - $VERSION = (qw$LastChangedRevision$)[1]; #@DEFAULT_ADDR is set in the BEGIN block @@ -90,11 +90,12 @@ # If not, it will do DNS lookups trying to resolve it as a hostname # We could also just set it to undef? - $addr = inet_ntoa($addr) unless $addr =~ /^[\w\.\-]+$/; + $addr = inet_ntoa($addr) unless (ip_is_ipv4($addr) || ip_is_ipv6($addr)); + # Pretty IP-addresses, if they are otherwise binary. my $addrname = $addr; - $addrname = inet_ntoa($addrname) unless $addrname =~ /^[\w \.\-]+$/; + $addrname = inet_ntoa($addrname) unless $addrname =~ /^[\w \.\:\-]+$/; print "Setting up listening sockets for $addrname...\n" if $self{"Verbose"}; ------------------------------------------------------ Ik dacht net... heel even maar.
Download PGP.sig
application/pgp-signature 227b

Message body not shown because it is not plain text.

From: berni [...] birkenwald.de
[olaf@dacht.net - Sat Nov 19 04:28:06 2005]: Show quoted text
> I do not have V6 connectivity at this very moment. But this patch > should do it. > Would you be willing to try?
The patch seems to work, thank you. Regards, Bernhard