1 ------------------------------------------------------------
3 revision-id: squid3@treenet.co.nz-20161030093920-5f7f2px9ea08rxlq
4 parent: squid3@treenet.co.nz-20161030093816-7vwnk5zrrql2p5ks
5 fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4567
6 committer: Amos Jeffries <squid3@treenet.co.nz>
8 timestamp: Sun 2016-10-30 22:39:20 +1300
10 Bug 4567: Strange IPv6 shown in access.log
11 ------------------------------------------------------------
12 # Bazaar merge directive format 2 (Bazaar 0.90)
13 # revision_id: squid3@treenet.co.nz-20161030093920-5f7f2px9ea08rxlq
14 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
15 # testament_sha1: 8dbae4e7fc5fb80afc6eee6800743abd1b1eaa47
16 # timestamp: 2016-10-30 09:40:47 +0000
17 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
18 # base_revision_id: squid3@treenet.co.nz-20161030093816-\
22 === modified file 'src/AccessLogEntry.cc'
23 --- src/AccessLogEntry.cc 2016-01-01 00:14:27 +0000
24 +++ src/AccessLogEntry.cc 2016-10-30 09:39:20 +0000
26 log_ip = request->indirect_client_addr;
29 - if (tcpClient != NULL)
31 log_ip = tcpClient->remote;
32 - else if (cache.caddr.isNoAddr()) { // e.g., ICAP OPTIONS lack client
33 - strncpy(buf, "-", bufsz);
39 + // internally generated requests (and some ICAP) lack client IP
40 + if (log_ip.isNoAddr()) {
41 + strncpy(buf, "-", bufsz);
45 // Apply so-called 'privacy masking' to IPv4 clients
46 // - localhost IP is always shown in full
47 // - IPv4 clients masked with client_netmask