cURL / Mailing Lists / curl-users / Single Mail

curl-users

Resolve failure with IPv6 installed

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Thu, 8 Jan 2004 17:20:07 +0100

There is a problem connecting to some sites when the
IPv6 protocol is installed on Win-XP (and other OS'es too?).

The error is simply that getaddrinfo() fails because of a buggy
nameserver. Example buggy DNS response for a valid domain:

>adig -t aaaa www.hanabank.com
Domain name not found
id: 57862
flags: qr rd ra
opcode: QUERY
rcode: NXDOMAIN
Questions:
        www.hanabank.com. AAAA
Answers:
NS records:
Additional records:

The guilty part seems to be (from whois):
 NIS.DACOM.CO.KR 164.124.101.31
 NS2.DACOM.CO.KR 203.248.240.31

in this case.

There is an A-record for the domain, so the DNS should return NOERROR with
no A-records (and not NXDOMAIN). End result seems to be that getaddrinfo() gives
up and does not do the A query.

I built with ENABLE_IPV6 and no ares. I don't know how ares does it (if at all?).
There could maybe be a race-condition on the A/AAAA responses (depending
on which comes first).

I'm not sure what libcurl could do about it. Or just let curl handle it by retrying
with CURLOPT_IPRESOLVE_V4. If libcurl should handle it, maybe retry with
getaddrinfo() and PF_INET?

--gv

-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
Received on 2004-01-08