From bec1c521c1f503a2cc359d795bc812f65f0cf94a Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 3 Oct 2013 05:17:30 -0600 Subject: [PATCH] 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. --- src/dns_internal.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dns_internal.cc b/src/dns_internal.cc index efff2fde69..27e82cbab3 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1555,6 +1555,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"); } -- 2.47.2