From 47d32f6cce803caa5abb701f5892b72db6c19e77 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 3 Oct 2013 04:38:31 -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 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"); } -- 2.47.2