Search squid archive

Custom Log with Client Source Port in 2.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Referring to
tor 2006-10-05 klockan 09:21 +0200 skrev Michele de Varda:

I have installed squid 2.5 stable 14 with the patch "Squid custom  log
format". I need to log source client port  for distinguishing client
connection behind NAT/PAT networks. In the patch syntax the source
client port is defined with "%>p" but this function seems to not be  yet
implemented. Is it  possible to know if  anyone has implemented this
feature?

As far as I know it has not been implemented yet.

Note: The custom log format is supported by default in Squid-2.6.

Regards
Henrik

I'm facing the same problem, i need to distinguish clients connection behind NAT networks

I changed the source code in 2.6 myself to make squid logging client soruce port I would like to share the modifed code with the developers and ppl who are looking for this function.

in src/access_log.c

change line
*LFT_CLIENT_PORT, */
to
LFT_CLIENT_PORT,

change
*{ ">p", LFT_CLIENT_PORT}, */
to
{ ">p", LFT_CLIENT_PORT},

change
/* case LFT_CLIENT_PORT: */
to
case LFT_CLIENT_PORT:
    if (al->request) {
 outint = al->request->client_port;
 doint = 1;
    }
    break;

then u can log, in your custom format with %>p

Regards
Gary Lau (Admire123)

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux