From: Amos Jeffries Date: Thu, 2 Aug 2012 11:39:08 +0000 (-0600) Subject: Bug 3593: socket failure: Address family not supported by protocol X-Git-Tag: SQUID_3_1_21~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb7e6845acb434d6d7777cca89e86bcefbcfdb8d;p=thirdparty%2Fsquid.git Bug 3593: socket failure: Address family not supported by protocol --- diff --git a/src/ip/IpAddress.cc b/src/ip/IpAddress.cc index 8ea0d06b47..434040eb67 100644 --- a/src/ip/IpAddress.cc +++ b/src/ip/IpAddress.cc @@ -605,7 +605,7 @@ void IpAddress::GetAddrInfo(struct addrinfo *&dst, int force) const && dst->ai_protocol == 0) dst->ai_protocol = IPPROTO_UDP; - if (force == AF_INET6 || (force == AF_UNSPEC && IsIPv6()) ) { + if (force == AF_INET6 || (force == AF_UNSPEC && Ip::EnableIpv6 && IsIPv6()) ) { dst->ai_addr = (struct sockaddr*)new sockaddr_in6; memset(dst->ai_addr,0,sizeof(struct sockaddr_in6));