]> 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 10:38:31 +0000 (04:38 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 3 Oct 2013 10:38:31 +0000 (04:38 -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 47810177bf2a104d3a8315d73b253577b3ffcc5a..0cc3d616267238a1514c47210961b0203c3a9048 100644 (file)
@@ -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");
     }