]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4024: Bad host/IP ::1 when using IPv4-only environment
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 14 Oct 2014 07:27:42 +0000 (00:27 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 14 Oct 2014 07:27:42 +0000 (00:27 -0700)
src/acl/Ip.cc

index 96397a0b74741b067616a8b4dddad14bc614ffbd..b799c7f9b33a84ccce63711038e7fe7e4f72514d 100644 (file)
@@ -384,10 +384,15 @@ acl_ip_data::FactoryParse(const char *t)
 
         int errcode = getaddrinfo(addr1,NULL,&hints,&hp);
         if (hp == NULL) {
-            debugs(28, DBG_CRITICAL, "aclIpParseIpData: Bad host/IP: '" << addr1 <<
-                   "' in '" << t << "', flags=" << hints.ai_flags <<
-                   " : (" << errcode << ") " << gai_strerror(errcode) );
-            self_destruct();
+            if (strcmp(addr1, "::1") == 0) {
+                debugs(28, DBG_IMPORTANT, "aclIpParseIpData: IPv6 has not been enabled in host DNS resolver.");
+                delete q;
+            } else {
+                debugs(28, DBG_CRITICAL, "aclIpParseIpData: Bad host/IP: '" << addr1 <<
+                       "' in '" << t << "', flags=" << hints.ai_flags <<
+                       " : (" << errcode << ") " << gai_strerror(errcode) );
+                self_destruct();
+            }
             return NULL;
         }