]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/squid/SQUID-2018_2.patch
Apache: Update to 2.4.34
[ipfire-2.x.git] / src / patches / squid / SQUID-2018_2.patch
CommitLineData
eb03c511
MF
1commit 8232b83d3fa47a1399f155cb829db829369fbae9 (refs/remotes/origin/v3.5)
2Author: squidadm <squidadm@users.noreply.github.com>
3Date: 2018-01-21 08:07:08 +1300
4
5 Fix indirect IP logging for transactions without a client connection (#129) (#136)
6
7diff --git a/src/client_side_request.cc b/src/client_side_request.cc
8index be124f3..203f89d 100644
9--- a/src/client_side_request.cc
10+++ b/src/client_side_request.cc
11@@ -488,9 +488,9 @@ clientFollowXForwardedForCheck(allow_t answer, void *data)
12 * Ensure that the access log shows the indirect client
13 * instead of the direct client.
14 */
15- ConnStateData *conn = http->getConn();
16- conn->log_addr = request->indirect_client_addr;
17- http->al->cache.caddr = conn->log_addr;
18+ http->al->cache.caddr = request->indirect_client_addr;
19+ if (ConnStateData *conn = http->getConn())
20+ conn->log_addr = request->indirect_client_addr;
21 }
22 request->x_forwarded_for_iterator.clean();
23 request->flags.done_follow_x_forwarded_for = true;