Re: confused about always_direct

From: Duane Wessels <[email protected]>
Date: Mon, 22 Feb 1999 20:08:18 -0700

Henrik Nordstrom writes:

>John Line (as web server manager) wrote:
>
>> acl local-domain dstdomain cam.ac.uk ac.uk ja.net
>...
>> (a) a Squid bug in handling a perfectly valid ACL that should have worked, or
>
>Looks like it. Perhaps the splay tree sorting is confused by the two
>.ac.uk entries and only finds cam.ac.uk...

Yes, this is the problem. SPLAY trees requires "orderable" keys.
But it is wrong to say that "ac.uk" is less-than, equal-to, or
greater-than "cam.ac.uk".

So, this seems to be a case of "can't have your cake and eat it too."
If you want "fast" tree indexing, instead of linked lists, then you can
not have one key (domain name) that is a subset of another in the same
ACL entry. Squid should probably try to detect this condition and then
complain.

If, for some reason, you wanted to, you could probably rewrite your
access list as follows:

        acl local1 dstdomain ac.uk
        acl local2 dstdomain cam.ac.uk
        acl local3 dstdomain ja.net
        ...
        http_access allow local1
        http_access allow local2
        http_access allow local3
        ...

Duane W.
Received on Mon Feb 22 1999 - 19:52:27 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:44:39 MST