pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/49189: Fixing broken DNS lookups in spamassassin

>Number:         49189
>Category:       pkg
>Synopsis:       Fixing broken DNS lookups in spamassassin
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 10 16:30:00 +0000 2014
>Originator:     Uwe Klaus
>Release:        pkgsrc-current
net/p5-Net-DNS update to version 0.79 breaks DNS lookups in mail/spamassassin

Net::DNS version 0.76 changed the field name holding a set of nameservers
in a Net::DNS::Resolver object: it used to be 'nameservers',
but is now split into two fields: 'nameserver4' and 'nameserver6'.

Mail/SpamAssassin/ relied on the internal field name
of a Net::DNS::Resolver object to obtain a default list of
recursive name servers, so the change in Net::DNS broke that.


Proposed patch:

--- Mail/SpamAssassin/       2014-05-07 17:54:29 +0200
+++ Mail/SpamAssassin/    2014-06-18 02:13:32 +0200
@@ -205,6 +205,8 @@
     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}});
+    my @ns = $res->UNIVERSAL::can('nameservers') ? $res->nameservers
+                                                 : @{$res->{nameservers}};
+    my $port = $res->UNIVERSAL::can('port') ? $res->port : $res->{port};
+    @ns_addr_port = map(untaint_var("[$_]:" . $port), @ns);
     dbg("dns: servers obtained from Net::DNS : %s", join(', ',@ns_addr_port));

Home | Main Index | Thread Index | Old Index