Re: Environment to build a squid helper

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 13 Aug 2008 23:11:08 +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?
>
>> 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.
>
> Regards
> Henrik

Bah. I've just had a brain re-adjustment.

  NO_ADDR == 255.255.255.255 == invalid parse request, as per standard
netinet/* definitions. Please disregard what I said in the last few
emails about it being == empty.

The NO_ADDR is used because OS are supposed to throw errors if anything
tries to use it. So we can track if squid is attempting to use a bad
address. If its set to empty or no-addr it would syntactically mean a
badly parsed address would be convertible to the default host IP by
squid (outbound send to/from ANY_ADDR may become broadcast or unicast
local host) and possibly used with unknown host kernel behavior.

Amos

-- 
Please use Squid 2.7.STABLE3 or 3.0.STABLE8
Received on Wed Aug 13 2008 - 11:11:04 MDT

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