]> 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>
Thu, 16 Oct 2014 18:56:03 +0000 (11:56 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 16 Oct 2014 18:56:03 +0000 (11:56 -0700)
src/acl/Ip.cc

index 47dc027d46c153d33b6de8fcf32761436630ab94..67e22f5e60f9ecc82b5c68e2a83fe572c00ffe6f 100644 (file)
@@ -411,10 +411,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;
         }