cURL / Mailing Lists / curl-library / Single Mail

curl-library

Workaround for missing ares_getaddrinfo() with IPv4 and IPv6

From: Tommie Gannert <tommie_at_spotify.com>
Date: Mon, 06 Dec 2010 11:13:05 +0100

Hi,

this is a patch to let hostares.c request both IPv4 and IPv6
addresses when IPv6 is enabled.

There are a few quirks, like adding num_pending and temp_ai
to Curl_async, that I'm not proud of and could probably be
improved. Also, failure handling could use a review.

Currently, c-ares returns IPv4 address when there are
no IPv6 addresses, and in those cases the Curl DNS cache will
contain duplicate addresses.

There are no ordering guarantees on which address family
comes first in the DNS cache. Is that needed?

-- 
Tommie

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2010-12-06