Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 452626 Details for
Bug 590338
mail-filter/spamassassin URIDNSBL broken by dev-perl/Net-DNS-1.40.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug_7338-use_trunk_complete_a_lookup.patch
bug_7338-use_trunk_complete_a_lookup.patch (text/plain), 2.42 KB, created by
Michael Orlitzky
on 2016-11-07 14:53:08 UTC
(
hide
)
Description:
bug_7338-use_trunk_complete_a_lookup.patch
Filename:
MIME Type:
Creator:
Michael Orlitzky
Created:
2016-11-07 14:53:08 UTC
Size:
2.42 KB
patch
obsolete
>From 97343b9b4eb8ae66fedada54bdd601ae058898c2 Mon Sep 17 00:00:00 2001 >From: Michael Orlitzky <michael@orlitzky.com> >Date: Mon, 7 Nov 2016 09:43:17 -0500 >Subject: [PATCH 1/1] Use complete_a_lookup() from latest trunk version of > URIDNSBL.pm. > >The complete_a_lookup() function in the URIDNSBL.pm shipped with >spamassassin-3.4.1 uses $rr->string to get an address from a resource >record. In older versions of Net::DNS, that method actually returned >the address; however, newer versions require $rr->address instead, and >the $rr->string method returns the wrong thing. > >SpamAssassin has fixed this upstream, but no backport has been made >yet. And unfortunately, the commit that fixed the change does not >apply cleanly. Since the function signature for complete_a_lookup() is >the same in trunk as it is in v3.4.1, this commit attempts to replace >the entire function with the trunk copy. > >SpamAssassin-Bug: 7338 >Gentoo-Bug: 590338 >--- > lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm | 24 +++++++++--------------- > 1 file changed, 9 insertions(+), 15 deletions(-) > >diff --git a/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm b/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm >index c4517b0..1fd1745 100644 >--- a/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm >+++ b/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm >@@ -1009,25 +1009,19 @@ sub complete_a_lookup { > dbg("uridnsbl: complete_a_lookup aborted %s", $ent->{key}); > return; > } >- > dbg("uridnsbl: complete_a_lookup %s", $ent->{key}); >- my @answer = $pkt->answer; >+ $hname = '' if !defined $hname; > my $j = 0; >+ my @answer = $pkt->answer; > foreach my $rr (@answer) { > $j++; >- my $str = $rr->string; >- if (!defined $hname) { >- warn "complete_a_lookup-1: $j, (hname is undef), $str"; >- } elsif (!defined $str) { >- warn "complete_a_lookup-2: $j, $hname, (str is undef)"; >- next; >- } >- dbg("uridnsbl: complete_a_lookup got(%d) A for %s: %s", $j,$hname,$str); >- >- if ($rr->type eq 'A') { >- my $ip_address = $rr->rdatastr; >- $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $ip_address); >- } >+ next if $rr->type ne 'A'; >+ # Net::DNS::RR::A::address() is available since Net::DNS 0.69 >+ my $ip_address = $rr->UNIVERSAL::can('address') ? $rr->address >+ : $rr->rdatastr; >+ dbg("uridnsbl: complete_a_lookup got(%d) A for %s: %s", >+ $j, $hname, $ip_address); >+ $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $ip_address); > } > } > >-- >2.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 590338
: 452626