From 85ffd33f087640bf43fe974cf4c70ad2c3929312 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 1 Nov 2008 23:49:54 +0000 Subject: Daniel Johnson reported and fixed ipv4 name resolves when libcurl is built with ipv6-enabled c-ares --- lib/hostares.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/hostares.c b/lib/hostares.c index d7dceaa1d..f17cdf5ec 100644 --- a/lib/hostares.c +++ b/lib/hostares.c @@ -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; -- cgit v1.2.3