Daniel Johnson reported and fixed ipv4 name resolves when libcurl is built

with ipv6-enabled c-ares
This commit is contained in:
Daniel Stenberg 2008-11-01 23:49:54 +00:00
parent c1b8e93083
commit 85ffd33f08
3 changed files with 28 additions and 2 deletions

View file

@ -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;