http://bugzilla.spamassassin.org/show_bug.cgi?id=4260





------- Additional Comments From [EMAIL PROTECTED]  2005-05-20 12:57 -------
Created an attachment (id=2884)
 --> (http://bugzilla.spamassassin.org/attachment.cgi?id=2884&action=view)
Patch to current trunk svn that uses question data as hash for uniqueness

Here is a patch thatshould take care of everything other than the current
failures in t/dnsbl.t tests. I haven't had a chance to look at that more than
to determine that this patch doesn't make it worse or better. That should be
dealt with in a separate bug.

This patch uses the data from the question section of the packet and the ID as
the hash key for ensuring that a packet reply matches the query. It doesn't
need to use SHA or anything like that because perl's own hashing takes care of
it at a memory cost of storing the query string for each DNS query made. That
makes the code simple too. The patch selects a port at random, which should
avoid what I think is the cause of most of the collisions we have been seeing,
then uses the hash to make it impossible to get a false result even if there is
a collision. The purpose of trying to reduce the collisions in the first place
is that there is a cost to receiving and discarding the packets. The purpose of
hte hash is that we can't completely eliminate collisions, especially since we
don't have control over SPF::Query's use of the DNS -- We can get collisions
from replies to packets that it sends out.

I would like to check this is and then deal with the t/dnsbl.t test failures.
My laptop died again and I don't have as good a development and testing
environment as usual. So please review and comment on this patch before I check
it in.




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Reply via email to