From: Amos Jeffries Date: Tue, 24 Sep 2013 14:19:08 +0000 (-0600) Subject: Use IPv6 localhost nameserver on DNS configuration errors X-Git-Tag: SQUID_3_5_0_1~634 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=747552d8a1af615910e0eac0d5b23383372f743d;p=thirdparty%2Fsquid.git Use IPv6 localhost nameserver on DNS configuration errors When DNS configuration fails to locate a set of nameservers "localhost" is used as the default but has previously only been setting 127.0.0.1 IPv4 address for localhost. This enables the failover to work as designed on IPv6-only networks. --- diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 47810177bf..0cc3d61626 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1612,6 +1612,8 @@ dnsInit(void) #endif debugs(78, DBG_IMPORTANT, "or use the 'dns_nameservers' option in squid.conf."); + if (Ip::EnableIpv6) + idnsAddNameserver("::1"); idnsAddNameserver("127.0.0.1"); }