Backport r1603518 from upstream to fix issues with recent Net::DNS
updates (>= 0.76). OK sthen
This commit is contained in:
parent
9bc70e4738
commit
50ffadbd60
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.90 2014/09/16 16:24:02 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.91 2014/09/30 13:06:24 okan Exp $
|
||||
|
||||
COMMENT= mailfilter to identify and mark spam
|
||||
|
||||
VER= 3.4.0
|
||||
REVISION= 3
|
||||
REVISION= 4
|
||||
DISTNAME= Mail-SpamAssassin-${VER}
|
||||
PKGNAME= p5-${DISTNAME}
|
||||
RULESNAME= Mail-SpamAssassin-rules-${VER}.r1565117.tgz
|
||||
|
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-lib_Mail_SpamAssassin_DnsResolver_pm,v 1.1 2014/09/30 13:06:24 okan Exp $
|
||||
|
||||
# r1603518 - fix DNS Resolving to fix the issues with Net::DNS >= 0.76
|
||||
|
||||
--- lib/Mail/SpamAssassin/DnsResolver.pm.orig Fri Feb 7 03:36:28 2014
|
||||
+++ lib/Mail/SpamAssassin/DnsResolver.pm Mon Sep 29 15:13:35 2014
|
||||
@@ -204,8 +204,10 @@ sub configured_nameservers {
|
||||
@ns_addr_port = @{$self->{conf}->{dns_servers}};
|
||||
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));
|
||||
}
|
||||
return @ns_addr_port;
|
Loading…
x
Reference in New Issue
Block a user