]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Use IPv6 localhost nameserver on DNS configuration errors
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 3 Oct 2013 11:17:30 +0000 (05:17 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 3 Oct 2013 11:17:30 +0000 (05:17 -0600)
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

index efff2fde69eed3904ccfd0a1878f5cf84a98f8f0..27e82cbab3eedd443363168076c6dff28b86a38d 100644 (file)
@@ -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");
     }