Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: devel

[Bug 6232] Net::DNS inconsistent in use of presentation/wire format in packets, breaks DnsResolver

 

 

SpamAssassin devel RSS feed   Index | Next | Previous | View Threaded


bugzilla-daemon at bugzilla

Nov 5, 2009, 8:49 AM

Post #1 of 2 (101 views)
Permalink
[Bug 6232] Net::DNS inconsistent in use of presentation/wire format in packets, breaks DnsResolver

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6232

Mark Martinec <Mark.Martinec[at]ijs.si> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|Undefined |3.3.0

--- Comment #1 from Mark Martinec <Mark.Martinec[at]ijs.si> 2009-11-05 08:49:57 UTC ---
A possible trick is to convert our query domain into its presentation form
when creating a Net::DNS::Packet object, by using undocumented procedure
presentation2wire or stripdot in Net::DNS. The following change
to the above test program appears to provide consistent results:

query(Net::DNS::stripdot(
"\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E.jp.multi.uribl.com"));

result:
\230\151\165\230\156\172\232\170\158.jp.multi.uribl.com
query: \230\151\165\230\156\172\232\170\158.jp.multi.uribl.com
reply: \230\151\165\230\156\172\232\170\158.jp.multi.uribl.com

Now, the question is, what was meant by authors of Net::DNS.
To me it seems more logical to keep raw bytes in the Net::DNS::Packet
object, and do the decoding/encoding in the interface routines
if necessary. If that is indeed the case, the above workaround
would break this, and a potential fix to Net::DNS could break our
workaround.

Do we have any contacts with Net::DNS guys?

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


bugzilla-daemon at bugzilla

Nov 5, 2009, 9:04 AM

Post #2 of 2 (95 views)
Permalink
[Bug 6232] Net::DNS inconsistent in use of presentation/wire format in packets, breaks DnsResolver [In reply to]

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6232

--- Comment #2 from Mark Martinec <Mark.Martinec[at]ijs.si> 2009-11-05 09:04:45 UTC ---
Here is a quick and ugly fix, for the time being:

--- lib/Mail/SpamAssassin/DnsResolver.pm (revision 833030)
+++ lib/Mail/SpamAssassin/DnsResolver.pm (working copy)
@@ -317,7 +317,7 @@
$self->connect_sock_if_reqd();
my $packet;
eval {
- $packet = Net::DNS::Packet->new($host, $type, $class);
+ $packet = Net::DNS::Packet->new(Net::DNS::stripdot($host), $type, $class);

# a bit noisy, so commented by default...
#dbg("dns: new DNS packet time=%s host=%s type=%s id=%s",


Bug 6232, a quick workaround hack to Net::DNS inconsistency
Sending lib/Mail/SpamAssassin/DnsResolver.pm
Committed revision 833081.

--
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

SpamAssassin devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.