access_log acl not observing my_port

2008-11-13 Thread Stephen Thorne
G'day,

I've been looking into a problem we've observed where this situation
does not work as expected, this is in squid-2.7.STABLE4:

acl direct myport 8080
access_log /var/log/squid/direct_proxy.log common direct

I did some tracing through the code and established that this chain of
events occurs:
httpRequestFree calls clientAclChecklistCreate calls aclChecklistCreate

But aclChecklistCacheInit is the function that populates the
checklist-my_port, which is required for a myport acl to work, and it
isn't called.

I have attached a patch that fixes this particular problem for me, which
simply calls aclChecklistCacheInit in clientAclChecklistCreate.

-- 
Regards,
Stephen Thorne
Development Engineer
NetBox Blue - 1300 737 060

Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)


Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)

--- squid/src/client_side.c 2008-11-14 15:07:55.0 +1000
+++ squid/src/client_side.c.new 2008-11-14 15:08:32.0 +1000
@@ -211,6 +211,7 @@
 ch = aclChecklistCreate(acl,
http-request,
conn-rfc931);
+aclChecklistCacheInit(ch);
 
 /*
  * hack for ident ACL. It needs to get full addresses, and a


Re: access_log acl not observing my_port

2008-11-13 Thread Adrian Chadd
g'day!

Just create a ticket in the Squid bugzilla and put the patch into there.

Thanks for your contribution!



Adrian


2008/11/13 Stephen Thorne [EMAIL PROTECTED]:
 G'day,

 I've been looking into a problem we've observed where this situation
 does not work as expected, this is in squid-2.7.STABLE4:

 acl direct myport 8080
 access_log /var/log/squid/direct_proxy.log common direct

 I did some tracing through the code and established that this chain of
 events occurs:
 httpRequestFree calls clientAclChecklistCreate calls aclChecklistCreate

 But aclChecklistCacheInit is the function that populates the
 checklist-my_port, which is required for a myport acl to work, and it
 isn't called.

 I have attached a patch that fixes this particular problem for me, which
 simply calls aclChecklistCacheInit in clientAclChecklistCreate.

 --
 Regards,
 Stephen Thorne
 Development Engineer
 NetBox Blue - 1300 737 060

 Scanned by the NetBox from NetBox Blue
 (http://netboxblue.com/)


 Scanned by the NetBox from NetBox Blue
 (http://netboxblue.com/)