mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:13:32 +03:00
resolve: make forced IPv4 resolve only use A queries
This protects IPv4-only transfers from undesired bad IPv6-related side effects and make IPv4 transfers in dual-stack libcurl behave the same way as in IPv4 single-stack libcurl. Closes #9540
This commit is contained in:
parent
ae9e713c4e
commit
1902e8fc51
5 changed files with 29 additions and 5 deletions
|
|
@ -707,7 +707,7 @@ struct Curl_addrinfo *Curl_resolver_getaddrinfo(struct Curl_easy *data,
|
|||
*waitp = 0; /* default to synchronous response */
|
||||
|
||||
#ifdef CURLRES_IPV6
|
||||
if(Curl_ipv6works(data))
|
||||
if(Curl_ipv6works(data) && data->conn->ip_version != CURL_IPRESOLVE_V4)
|
||||
/* The stack seems to be IPv6-enabled */
|
||||
pf = PF_UNSPEC;
|
||||
#endif /* CURLRES_IPV6 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue