Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] hash table acceleration breaks lazyaw

2006-03-27 by Ranko Zivojnovic

Hi,

On Mon, 2006-03-27 at 09:18 +0900, Hajimu UMEMOTO wrote:
> Hi,
> 
> >>>>> On Mon, 27 Mar 2006 02:01:20 +0300
> >>>>> Ranko Zivojnovic <ranko@...> said:
> 
> ranko> ! #define BUCKET_HASH_V6(sa, from, rcpt, bucket_count)
> \
> ranko> !   ((((uint32_t)(SADDR6(sa)->s6_addr)[3] &                  \
> ranko> !      (uint32_t)(((ipaddr
> *)&conf.c_match_mask)->in6.s6_addr)[3])\
> ranko> !     ^ F2B_SPICE(from, rcpt))                              \
> ranko> !    % bucket_count)
> 
> It seems this test is broken for an IPv6.  Why do you check only
> (uint32_t)(SADDR6(sa)->s6_addr)[3]?  We need to check whole address.
> 

I was taking only the last part of the v6 address because that was the
place I would expect the most "activity" - and we are only creating the
hash. But either way you're right - we should take the whole address
length into account. Especially now with the netmask in the game.

Please consider this version.

Best regards,

Ranko

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.