summaryrefslogtreecommitdiff
path: root/extra/spamassassin/net-dns.patch
blob: 76d28167d7f423bf98c59d18a3807d8d0964e929 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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;