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


Mark Martinec <[EMAIL PROTECTED]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[review] add_cidr chokes on |add_cidr chokes on large
                   |large amount of             |amount of trusted_networks
                   |trusted_networks            |
  Status Whiteboard|needs 1 votes               |




--- Comment #7 from Mark Martinec <[EMAIL PROTECTED]>  2008-10-17 18:45:17 PST 
---
> I would much prefer that the existing
> check be performed until the amount of ranges inputted makes it impractical
> to do so (say when 200 ranges are added it skips the O(N^2) bit).

That's a sensible compromise.

Btw, I wonder if cases of several thousand entries are more common
than anticipated. If they are, it might make sense to provide an
alternative mechanism, much faster but less flexible, like a
hash table of classful network addresses. For an IPv4 address,
four hash lookups would suffice for a check, regardless of the
size of a hash table (practically a constant access time).
Both methods would not combine well (in presence of overlapping
ranges), but chosing one or another would be a good option.
(btw, these two lookup types are offered by amavisd-new).


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

Reply via email to