mirror of
https://github.com/curl/curl.git
synced 2026-07-22 22:17:18 +03:00
parent
48f61e781a
commit
6a9f3764f1
2 changed files with 6 additions and 0 deletions
|
|
@ -1749,7 +1749,11 @@ static CURLcode cf_socket_query(struct Curl_cfilter *cf,
|
|||
return CURLE_OK;
|
||||
}
|
||||
case CF_QUERY_IP_INFO:
|
||||
#ifdef USE_IPV6
|
||||
*pres1 = (ctx->addr.family == AF_INET6)? TRUE : FALSE;
|
||||
#else
|
||||
*pres1 = FALSE;
|
||||
#endif
|
||||
*(struct ip_quadruple *)pres2 = ctx->ip;
|
||||
return CURLE_OK;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -800,8 +800,10 @@ static CURLcode start_connect(struct Curl_cfilter *cf,
|
|||
}
|
||||
else {
|
||||
/* no user preference, we try ipv6 always first when available */
|
||||
#ifdef USE_IPV6
|
||||
ai_family0 = AF_INET6;
|
||||
addr0 = addr_first_match(remotehost->addr, ai_family0);
|
||||
#endif
|
||||
/* next candidate is ipv4 */
|
||||
ai_family1 = AF_INET;
|
||||
addr1 = addr_first_match(remotehost->addr, ai_family1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue