core/spamassassin/net-dns.patch
2015-03-06 12:17:44 +00:00

42 lines
1.6 KiB
Diff

Fix FS#40707 by
- disabling the failing version check. We don't ship versions that old anyway.
- fix nameservers fetching from Net::DNS
---
diff -Nur a/lib/Mail/SpamAssassin/Dns.pm b/lib/Mail/SpamAssassin/Dns.pm
--- a/lib/Mail/SpamAssassin/Dns.pm 2014-06-05 19:34:56.299391918 +0200
+++ b/lib/Mail/SpamAssassin/Dns.pm 2014-06-05 19:35:56.816256160 +0200
@@ -518,7 +518,7 @@
}
}
else {
- if ($Net::DNS::VERSION < 0.34) {
+ if (0) {
warn("dns: Net::DNS version is $Net::DNS::VERSION, but need 0.34");
return $IS_DNS_AVAILABLE;
}
diff -Nur a/lib/Mail/SpamAssassin/Plugin/AskDNS.pm Mail-SpamAssassin-3.4.0/lib/Mail/SpamAssassin/Plugin/AskDNS.pm
--- a/lib/Mail/SpamAssassin/Plugin/AskDNS.pm 2014-06-05 19:34:56.302725263 +0200
+++ b/lib/Mail/SpamAssassin/Plugin/AskDNS.pm 2014-06-05 19:35:30.086168916 +0200
@@ -211,7 +211,7 @@
$self->set_config($sa_main->{conf});
- $txtdata_can_provide_a_list = Net::DNS->VERSION >= 0.69;
+ $txtdata_can_provide_a_list = 1;
return $self;
}
--- a/lib/Mail/SpamAssassin/DnsResolver.pm 2014-06-08 12:48:29.064230952 +0800
+++ b/lib/Mail/SpamAssassin/DnsResolver.pm 2014-06-08 12:49:06.961872678 +0800
@@ -205,7 +205,7 @@
dbg("dns: servers set by config to: %s", join(', ',@ns_addr_port));
} elsif ($res) { # default as provided by Net::DNS, e.g. /etc/resolv.conf
@ns_addr_port = map(untaint_var("[$_]:" . $res->{port}),
- @{$res->{nameservers}});
+ $res->nameservers);
dbg("dns: servers obtained from Net::DNS : %s", join(', ',@ns_addr_port));
}
return @ns_addr_port;