From: Amos Jeffries Date: Wed, 25 Jul 2012 22:29:21 +0000 (+1200) Subject: Bug 3593: socket failure: Address family not supported by protocol X-Git-Tag: sourceformat-review-1~162 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5fbbc7;p=thirdparty%2Fsquid.git Bug 3593: socket failure: Address family not supported by protocol --- diff --git a/src/ip/Address.cc b/src/ip/Address.cc index 9763d7978f..5c0946124a 100644 --- a/src/ip/Address.cc +++ b/src/ip/Address.cc @@ -644,7 +644,7 @@ Ip::Address::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));