mirror of
https://github.com/curl/curl.git
synced 2026-08-11 02:21:01 +03:00
Daniel Johnson reported and fixed ipv4 name resolves when libcurl is built
with ipv6-enabled c-ares
This commit is contained in:
parent
c1b8e93083
commit
85ffd33f08
3 changed files with 28 additions and 2 deletions
|
|
@ -399,9 +399,12 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||
|
||||
switch(data->set.ip_version) {
|
||||
case CURL_IPRESOLVE_V4:
|
||||
default: /* By default we try ipv4, as PF_UNSPEC isn't supported by c-ares.
|
||||
This is a bit disturbing since users may very well assume that
|
||||
both kinds of addresses are asked for, but the problem is really
|
||||
in c-ares' end here. */
|
||||
family = PF_INET;
|
||||
break;
|
||||
default: /* by default we try ipv6, as PF_UNSPEC isn't supported by (c-)ares */
|
||||
case CURL_IPRESOLVE_V6:
|
||||
family = PF_INET6;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue