]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/squid/squid-3.5-14105.patch
squid 3.5.22: latest patches (14103-14113)
[ipfire-2.x.git] / src / patches / squid / squid-3.5-14105.patch
1 ------------------------------------------------------------
2 revno: 14105
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>
7 branch nick: 3.5
8 timestamp: Sun 2016-10-30 22:39:20 +1300
9 message:
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-\
19 # 7vwnk5zrrql2p5ks
20 #
21 # Begin patch
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
25 @@ -30,14 +30,17 @@
26 log_ip = request->indirect_client_addr;
27 else
28 #endif
29 - if (tcpClient != NULL)
30 + if (tcpClient)
31 log_ip = tcpClient->remote;
32 - else if (cache.caddr.isNoAddr()) { // e.g., ICAP OPTIONS lack client
33 - strncpy(buf, "-", bufsz);
34 - return;
35 - } else
36 + else
37 log_ip = cache.caddr;
38
39 + // internally generated requests (and some ICAP) lack client IP
40 + if (log_ip.isNoAddr()) {
41 + strncpy(buf, "-", bufsz);
42 + return;
43 + }
44 +
45 // Apply so-called 'privacy masking' to IPv4 clients
46 // - localhost IP is always shown in full
47 // - IPv4 clients masked with client_netmask
48