From bb7e6845acb434d6d7777cca89e86bcefbcfdb8d Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 2 Aug 2012 05:39:08 -0600 Subject: [PATCH] Bug 3593: socket failure: Address family not supported by protocol --- src/ip/IpAddress.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.47.2