aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/perl-net-dns-resolver-programmable-fix.patch
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-05-24 12:05:47 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-05-24 12:05:47 +0200
commitd1a914082b7e53636f9801769ef96218b2125c4b (patch)
tree998805fc59fe0b1bb105b24a6a79fff646257d96 /gnu/packages/patches/perl-net-dns-resolver-programmable-fix.patch
parent657fb6c947d94cf946f29cd24e88bd080c01ff0a (diff)
parentae548434337cddf9677a4cd52b9370810b2cc9b6 (diff)
downloadguix-d1a914082b7e53636f9801769ef96218b2125c4b.tar
guix-d1a914082b7e53636f9801769ef96218b2125c4b.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/perl-net-dns-resolver-programmable-fix.patch')
-rw-r--r--gnu/packages/patches/perl-net-dns-resolver-programmable-fix.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/patches/perl-net-dns-resolver-programmable-fix.patch b/gnu/packages/patches/perl-net-dns-resolver-programmable-fix.patch
new file mode 100644
index 0000000000..371693dca1
--- /dev/null
+++ b/gnu/packages/patches/perl-net-dns-resolver-programmable-fix.patch
@@ -0,0 +1,30 @@
+perl-net-dns-resolver-programmable used the undocumented and internal
+method Net::DNS::rcodesbyname [0], and that interface is no longer
+exposed.
+
+This patch, copied from [1], makes the program check for the existence
+of the method before trying to use it.
+
+[0]
+<https://rt.cpan.org/Public/Bug/Display.html?id=95901>
+
+[1]
+<https://rt.cpan.org/Public/Bug/Display.html?id=95901#txn-1575108>
+
+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);