Re: Environment to build a squid helper

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 13 Aug 2008 22:40:02 +1200

Henrik Nordstrom wrote:
> On ons, 2008-08-13 at 16:25 +1200, Amos Jeffries wrote:
>>> Or maybe = "" should be equivalent to SetEmpty() in which case the
>>> original code works, and can be simplified a lot... not sure how
>>> IPAddress is supposed to work here, if it at all is supposed to be used
>>> in = ""..
>> It should be capable of accepting it. "" == NULL == "garbage" to IPAddress.
>
> Assigning "garbage" is an error.
>
> What should the IPAddress be set to in such case?

Should be no-addr aka empty in all parsing failed cases. The only valid
non-IP case is a resolvable FQDN, which becomes the first located IP.

>
>> IIRC, the ACLIP::match() logics depend on addr2 being either the end of a
>> range different to addr1 or empty for optimal testing. addr1==addr2 is
>> worst-case match() state for every request.
>
> I suspect normalising all specifications into ranges may actually be the
> optimal case.. that way the match function becomes very simple, just a
> memcmp if you like.. (well, two memcmp, one for each bound, and
> preferably with alignment attributes so GCC optimizes them fully). But
> it requires finally dropping support for non-contiguous netmasks.

We may have to test the speed of IsNoAddr() vs memcmp().

The last bit about netmasks is a registered bug already ;-)
http://www.squid-cache.org/bugs/show_bug.cgi?id=2141

Amos

-- 
Please use Squid 2.7.STABLE3 or 3.0.STABLE8
Received on Wed Aug 13 2008 - 10:39:59 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 13 2008 - 12:00:05 MDT