]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3593: socket failure: Address family not supported by protocol
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 27 Jul 2012 04:28:30 +0000 (22:28 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 27 Jul 2012 04:28:30 +0000 (22:28 -0600)
src/ip/Address.cc

index 74521b220621e65150ea8ebccc2c3076ba81445c..a30c451de1f27fa8849814e034b20678df50fc3d 100644 (file)
@@ -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));