From: uhliarik Date: Mon, 15 Jul 2019 03:42:39 +0000 (+0000) Subject: Bug 4966: Lower cache_peer hostname (#420) X-Git-Tag: SQUID_5_0_1~69 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3527ec67a9ddad9c189ae360d4f6181d5413bfa;p=thirdparty%2Fsquid.git Bug 4966: Lower cache_peer hostname (#420) When parsing entries from /etc/hosts file, they are all lowered (see bug 3040). If cache_peer hostname is uppercase, it will lead to DNS resolution failure. Lowering cache_peer host fixes this issue. This change may expose broken Squid configurations that incorrectly relied on non-lowercase peer host names to bypass Squid's "is this cache_peer different from me?" check. Though such configurations should encounter forwarding loop errors later anyway. --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index ff1b0e6833..4ef581279b 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -2139,6 +2139,7 @@ parse_peer(CachePeer ** head) CachePeer *p = new CachePeer; p->host = xstrdup(host_str); + Tolower(p->host); p->name = xstrdup(host_str); p->type = parseNeighborType(token);