I patched squid with http://devel.squid-cache.org/projects.html#external_acl_fuzzy.
Squid.conf: I used parameters ..... %SRC %SRCPORT %MYADDR %MYPORT external_ident ..... Squid Version: Version 2.5.STABLE7
But in external_ident %SRCPORT is always equal to 0! Other parameters are correct.
On Thu, 9 Dec 2004, You wrote:
It is meant to work, and I seem to remember seeing it working in my tests while developing the external_acl_fuzzy branch of Squid.
If you figure out what the bug is please send me a patch.
Regards Henrik
Hello!
Several month passed and I decided to try to solve that problem again.
Squid version: 2.5.STABLE9
Patch: http://devel.squid-cache.org/projects.html#external_acl_fuzzy, size 21479.
I noticed that in patch the field "client_port" of "request" struct was added but never initialized.
So I added
request->client_port = ntohs(conn->peer.sin_port);
in client_side.c
Patch:
--- client_side.c.orig
+++ client_side.c
@@ -3131,6 +3131,7 @@
safe_free(http->log_uri);
http->log_uri = xstrdup(urlCanonicalClean(request));
request->client_addr = conn->peer.sin_addr;
+ request->client_port = ntohs(conn->peer.sin_port);
request->my_addr = conn->me.sin_addr;
request->my_port = ntohs(conn->me.sin_port);
request->http_ver = http->http_ver;
It seems to work: the field %SRCPORT is filled with source port in external helper.
Is this patch correct?
wbr, Ilya