summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2016-06-08 07:23:54 +0800
committerJay Satiro <raysatiro@yahoo.com>2016-06-07 22:23:24 -0400
commit608d161b605e4ac0ebdab6c89c64e14423a0457a (patch)
tree7204546bf89a90c3eb0d43fe38f95862331cc05b /lib
parent01a49a7626ee4a226cd0b50d70591ab147d60ee0 (diff)
downloadcurl-608d161b605e4ac0ebdab6c89c64e14423a0457a.tar.gz
resolve: enable protocol family logic for synthesized IPv6
- Enable protocol family logic for IPv6 resolves even when support for synthesized addresses is enabled. This is a follow up to the parent commit that added support for synthesized IPv6 addresses from IPv4 on iOS/OS X. The protocol family logic needed for IPv6 was inadvertently excluded if support for synthesized addresses was enabled. Bug: https://github.com/curl/curl/issues/863 Ref: https://github.com/curl/curl/pull/866 Ref: https://github.com/curl/curl/pull/867
Diffstat (limited to 'lib')
-rw-r--r--lib/asyn-thread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index 0ca260334..967859a07 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -616,7 +616,10 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
if(Curl_inet_pton(AF_INET6, hostname, &in6) > 0)
/* This is an IPv6 address literal */
return Curl_ip2addr(AF_INET6, &in6, hostname, port);
+#endif /* CURLRES_IPV6 */
+#endif /* !USE_RESOLVE_ON_IPS */
+#ifdef CURLRES_IPV6
/*
* Check if a limited name resolve has been requested.
*/
@@ -635,9 +638,7 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
if((pf != PF_INET) && !Curl_ipv6works())
/* The stack seems to be a non-IPv6 one */
pf = PF_INET;
-
#endif /* CURLRES_IPV6 */
-#endif /* USE_RESOLVE_ON_IPS */
memset(&hints, 0, sizeof(hints));
hints.ai_family = pf;