From: Amos Jeffries Date: Thu, 3 Oct 2013 10:38:31 +0000 (-0600) Subject: Use IPv6 localhost nameserver on DNS configuration errors X-Git-Tag: SQUID_3_4_0_2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47d32f6cce803caa5abb701f5892b72db6c19e77;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"); }