Skip Menu |
 

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

Report information
The Basics
Id: 95901
Status: resolved
Priority: 0/
Queue: Net-DNS-Resolver-Programmable

People
Owner: Nobody in particular
Requestors: NLNETLABS [...] cpan.org
Cc:
AdminCc:

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



Subject: Use Net::DNS::Paramters::rcodebyname
Download (untitled) / with headers
text/plain 381b
Hi, You have used the undocumented internal Net::DNS::rcodesbyname in your package. This internal is no longer exposed since Net::DNS 0.75. I propose to also test for rcodes existence with $Net::DNS::Parameters::rcodebyname{$result} Mail-SPF unit tests are dependent on this, see: https://rt.cpan.org/Public/Bug/Display.html?id=95858 . See attached patch. Regards, -- Willem
Download (untitled) / with headers
text/plain 719b
Curious, I didn't see the patch I attached, but I can copy/paste it in here as well: --- Programmable.pm.orig 2014-05-23 23:19:36.000000000 +0200 +++ Programmable.pm 2014-05-23 23:22:37.621007729 +0200 @@ -204,8 +204,10 @@ if (defined(my $resolver_code = $self->{resolver_code})) { ($result, $aa, @answer_rrs) = $resolver_code->($domain, $rr_type, $class); } - - if (not defined($result) or defined($Net::DNS::rcodesbyname{$result})) { + + if (not defined($result) + or defined($Net::DNS::rcodesbyname{$result} + or defined($Net::DNS::Parameters::rcodebyname{$result})) { # Valid RCODE, return a packet: $aa = TRUE if not defined($aa);
Here's the patch with one more closing parenthesis :)
Subject: new-net-dns.patch
Download new-net-dns.patch
text/x-diff 881b
Description: deal with changes in Net::DNS >= 0.75 Origin: CPAN RT Bug: https://rt.cpan.org/Public/Bug/Display.html?id=95901 Bug-Debian: https://bugs.debian.org/752988 Author: Willen <NLNETLABS@cpan.org> Reviewed-by: gregor herrmann <gregoa@debian.org> Last-Update: 2014-06-29 --- a/lib/Net/DNS/Resolver/Programmable.pm +++ b/lib/Net/DNS/Resolver/Programmable.pm @@ -204,8 +204,10 @@ if (defined(my $resolver_code = $self->{resolver_code})) { ($result, $aa, @answer_rrs) = $resolver_code->($domain, $rr_type, $class); } - - if (not defined($result) or defined($Net::DNS::rcodesbyname{$result})) { + + if (not defined($result) + or defined($Net::DNS::rcodesbyname{$result}) + or defined($Net::DNS::Parameters::rcodebyname{$result})) { # Valid RCODE, return a packet: $aa = TRUE if not defined($aa);
From: editor.buzzfeed [...] yahoo.com
Download (untitled) / with headers
text/plain 651b
--- Programmable.pm.orig 2014-05-23 23:19:36.000000000 +0200 +++ Programmable.pm 2014-05-23 23:22:37.621007729 +0200 @@ -204,8 +204,10 @@ if (defined(my $resolver_code = $self->{resolver_code})) { ($result, $aa, @answer_rrs) = $resolver_code->($domain, $rr_type, $class); } - - if (not defined($result) or defined($Net::DNS::rcodesbyname{$result})) { + + if (not defined($result) + or defined($Net::DNS::rcodesbyname{$result} + or defined($Net::DNS::Parameters::rcodebyname{$result})) { # Valid RCODE, return a packet: $aa = TRUE if not defined($aa); ----------- Thanks, LissaCoffey - <a href="http://www.fixithere.net/" rel="bookmark">fixithere</a>
Download (untitled) / with headers
text/plain 187b
The new one we're using is the illegal call to internal %Net::DNS::Parameters::rcodebyname right? If so, then possibly check that one first to save lookups on people who are up to date?
Subject: patch.txt
Download patch.txt
text/plain 733b
diff --git a/lib/Net/DNS/Resolver/Programmable.pm b/lib/Net/DNS/Resolver/Programmable.pm index 1af72ce..e09a2f0 100644 --- a/lib/Net/DNS/Resolver/Programmable.pm +++ b/lib/Net/DNS/Resolver/Programmable.pm @@ -203,8 +203,10 @@ sub send { if (defined(my $resolver_code = $self->{resolver_code})) { ($result, $aa, @answer_rrs) = $resolver_code->($domain, $rr_type, $class); } - - if (not defined($result) or defined($Net::DNS::rcodesbyname{$result})) { + + if (not defined($result) + or defined($Net::DNS::Parameters::rcodebyname{$result}) + or defined($Net::DNS::rcodesbyname{$result})) { # Valid RCODE, return a packet: $aa = TRUE if not defined($aa);
Download (untitled) / with headers
text/plain 239b
0.005, hitting CPAN shortly, contains the patch from #96390, which I believe will fix this problem. I'm marking this as resolved, but please do correct me if there's a good reason to pull in Net::DNS::Parameters instead. Cheers Dave P


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.