From: Amos Jeffries Date: Thu, 16 Oct 2014 18:56:03 +0000 (-0700) Subject: Bug 4024: Bad host/IP ::1 when using IPv4-only environment X-Git-Tag: SQUID_3_4_9~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bf15cd4560e518491bf1b119890c18488e1d4fe;p=thirdparty%2Fsquid.git Bug 4024: Bad host/IP ::1 when using IPv4-only environment --- diff --git a/src/acl/Ip.cc b/src/acl/Ip.cc index 47dc027d46..67e22f5e60 100644 --- a/src/acl/Ip.cc +++ b/src/acl/Ip.cc @@ -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; }