You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2005/06/22 01:02:43 UTC
[Bug 4417] New: DnsResolver.pm/connect_sock() fails on IPv6 resolver address
http://bugzilla.spamassassin.org/show_bug.cgi?id=4417
Summary: DnsResolver.pm/connect_sock() fails on IPv6 resolver
address
Product: Spamassassin
Version: SVN Trunk (Latest Devel Version)
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P5
Component: Libraries
AssignedTo: dev@spamassassin.apache.org
ReportedBy: Mark.Martinec@ijs.si
The code section in DnsResolver.pm/connect_sock:
$self->{sock} = $sock;
$self->{dest} = sockaddr_in($self->{res}->{port},
inet_aton($self->{res}->{nameservers}[0]));
fails because $self->{res}->{nameservers}[0] is a string "::1"
and inet_aton does not recognize IPv6 syntax.
environment: spamassassin_20050620223535 (SVN),
Net::DNS 0.51, IPv6-enabled OS, module IO::Socket::INET6 installed,
/etc/resolv.conf contains entry: nameserver ::1
The problem is easily repeatable:
$ spamassassin -tD
[50765] dbg: logger: adding facilities: all
[50765] dbg: logger: logging level is DBG
[50765] dbg: generic: SpamAssassin version 3.1.0-pre2-r191258
...
[50765] dbg: dns: is Net::DNS::Resolver available? yes
[50765] dbg: dns: Net::DNS version: 0.51
[50765] warn: Use of uninitialized value in subroutine entry
at /usr/local/lib/perl5/5.8.6/mach/Socket.pm line 373.
Bad arg length for Socket::pack_sockaddr_in, length is 0,
should be 4
at /usr/local/lib/perl5/5.8.6/mach/Socket.pm line 373.
It is interesting that this used to work (with IPv6 resolver)
with somewhat older SVN version of SA (spamassassin_20050526104220).
Note that the current Net::DNS 0.51 does support IPv6 resolvers
when module IO::Socket::INET6 is installed. Seems to be the
SA-supplied wrapper/replacement routines in DnsResolver.pm
try to over-optimize what is available and working in Net::DNS.
A workaround is to remove the "nameserver ::1" entry
from /etc/resolv.conf and provide only IPv4 addresses
of resolvers. Unfortunately this also affects other
applications on the host.
Regards
Mark
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[Bug 4417] DnsResolver.pm/connect_sock() fails on IPv6 resolver address
Posted by bu...@bugzilla.spamassassin.org.
http://bugzilla.spamassassin.org/show_bug.cgi?id=4417
Mark.Martinec@ijs.si changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
------- Additional Comments From Mark.Martinec@ijs.si 2005-06-21 16:06 -------
Sorry for a re-post, I accidentally resubmitted the same report.
Mark
*** This bug has been marked as a duplicate of 4412 ***
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.