Skip Menu |

This queue is for tickets about the ParaDNS CPAN distribution.

Report information
The Basics
Id: 98386
Status: open
Priority: 0/
Queue: ParaDNS

People
Owner: Nobody in particular
Requestors: andy [...] broadbean.com
Cc:
AdminCc:

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



Subject: Compatability with recent Net::DNS releases
Here is a patch to ParaDNS::Resolver as newer releases of Net::DNS::Resolver have split the nameservers attribute into nameservers4 & nameservers6. The nameservers method was added to Net::DNS::Resolver before v0.48 so I haven't needed to bump any dependencies. Came across this when the last test in 00basic.t failed (gets NXDOMAIN instead of an ip address). In case it helps others, all tests pass if you install an older version of Net::DNS like 0.65 as a workaround.
Subject: net-dns-compat.patch
--- lib/ParaDNS/Resolver.pm 2014-08-28 15:36:43.000000000 +0100 +++ lib/ParaDNS/Resolver.pm 2014-08-28 15:37:01.000000000 +0100 @@ -40,7 +40,7 @@ } } else { - foreach my $ns (@{ $res->{nameservers} }) { + foreach my $ns ( $res->nameservers ) { trace(2, "Using nameserver $ns:$res->{port}\n"); my $dst_sockaddr = sockaddr_in($res->{'port'}, inet_aton($ns)); push @{$self->{dst}}, $dst_sockaddr;
From: deadhead [...] goodfellow.it
Il Gio 28 Ago 2014 10:53:23, andy_jones@outgun.com ha scritto: Show quoted text
> Here is a patch to ParaDNS::Resolver as newer releases of > Net::DNS::Resolver have split the nameservers attribute into > nameservers4 & nameservers6.
On my CentOS7/RHEL7 tests fail. Even trying the patch I still have problems. Those the components version: Perl v5.16.3 perl-Danga-Socket-1.61 perl-Net-DNS-0.72 ParaDNS-2.0 Follow the output: " [ParaDNS-2.0]# perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for ParaDNS [ParaDNS-2.0]# make cp lib/ParaDNS/Resolver.pm blib/lib/ParaDNS/Resolver.pm cp lib/ParaDNS.pm blib/lib/ParaDNS.pm cp fast-rdns.pl blib/lib/fast-rdns.pl cp fast-rdns.pl blib/script/fast-rdns.pl /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/fast-rdns.pl Manifying blib/man3/ParaDNS::Resolver.3pm Manifying blib/man3/ParaDNS.3pm [ParaDNS-2.0]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00basic.t .. 1/5 # Failed test 'Got nosuchhost.axkit.org doesn't exist (NOANSWER)' # at t/00basic.t line 44. # Looks like you failed 1 test of 5. t/00basic.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/5 subtests Test Summary Report ------------------- t/00basic.t (Wstat: 256 Tests: 5 Failed: 1) Failed test: 3 Non-zero exit status: 1 Files=1, Tests=5, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.10 cusr 0.02 csys = 0.15 CPU) Result: FAIL Failed 1/1 test programs. 1/5 subtests failed. make: *** [test_dynamic] Errore 1 " thanks
From: andy_jones [...] outgun.com
I'm getting that as well on new installs (looking up a host that doesn't exist returns NOANSWER instead of NXDOMAIN) I think it is related to the change in Net::DNS 0.71 in the changelog: Fix rt.cpan.org #81787 NXDOMAIN no longer reported by $resolver->errorstring. Checking $packet->header->rcode as well as $res->errorstring does the trick for me but there may be other repercussions: --- a/lib/ParaDNS/Resolver.pm +++ b/lib/ParaDNS/Resolver.pm @@ -216,7 +216,6 @@ sub event_read { my $res = $self->{res}; while (my $packet = $res->bgread($sock)) { - my $err = $res->errorstring; my $answers = 0; my $header = $packet->header; my $id = $header->id; @@ -278,6 +277,7 @@ sub event_read { $answers++; } if (!$answers) { + my $err = $res->errorstring || $packet->header->rcode; if ($err eq "NXDOMAIN") { # trace("found => NXDOMAIN\n"); $qobj->run_callback("NXDOMAIN"); On Mon Sep 08 11:28:20 2014, deadhead@goodfellow.it wrote: Show quoted text
> Il Gio 28 Ago 2014 10:53:23, andy_jones@outgun.com ha scritto:
> > Here is a patch to ParaDNS::Resolver as newer releases of > > Net::DNS::Resolver have split the nameservers attribute into > > nameservers4 & nameservers6.
> > On my CentOS7/RHEL7 tests fail. Even trying the patch I still have > problems. > > Those the components version: > > Perl v5.16.3 > perl-Danga-Socket-1.61 > perl-Net-DNS-0.72 > ParaDNS-2.0 > > Follow the output: > " > [ParaDNS-2.0]# perl Makefile.PL > Checking if your kit is complete... > Looks good > Writing Makefile for ParaDNS > [ParaDNS-2.0]# make > cp lib/ParaDNS/Resolver.pm blib/lib/ParaDNS/Resolver.pm > cp lib/ParaDNS.pm blib/lib/ParaDNS.pm > cp fast-rdns.pl blib/lib/fast-rdns.pl > cp fast-rdns.pl blib/script/fast-rdns.pl > /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- > blib/script/fast-rdns.pl > Manifying blib/man3/ParaDNS::Resolver.3pm > Manifying blib/man3/ParaDNS.3pm > [ParaDNS-2.0]# make test > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > t/00basic.t .. 1/5 > # Failed test 'Got nosuchhost.axkit.org doesn't exist (NOANSWER)' > # at t/00basic.t line 44. > # Looks like you failed 1 test of 5. > t/00basic.t .. Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/5 subtests > > Test Summary Report > ------------------- > t/00basic.t (Wstat: 256 Tests: 5 Failed: 1) > Failed test: 3 > Non-zero exit status: 1 > Files=1, Tests=5, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.10 cusr > 0.02 csys = 0.15 CPU) > Result: FAIL > Failed 1/1 test programs. 1/5 subtests failed. > make: *** [test_dynamic] Errore 1 > " > > thanks