cURL / Mailing Lists / curl-library / Single Mail

curl-library

multihomed connections

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Tue, 8 Jun 2004 16:26:27 +0200

How is curl/libcurl supposed to connect to a host with multiple
IPv4 addresses? I image it would try each address in succession.

E.g this host:
>adig ubr4-ca5-0-sec.landg1.lb.home.nl
id: 38831
flags: qr rd ra
opcode: QUERY
rcode: NOERROR
Questions:
        ubr4-ca5-0-sec.landg1.lb.home.nl. A
Answers:
        ubr4-ca5-0-sec.landg1.lb.home.nl. 84321 A 82.72.140.1
        ubr4-ca5-0-sec.landg1.lb.home.nl. 84321 A 82.73.204.1
        ubr4-ca5-0-sec.landg1.lb.home.nl. 84321 A 217.121.93.1
        ubr4-ca5-0-sec.landg1.lb.home.nl. 84321 A 217.122.53.1
        ubr4-ca5-0-sec.landg1.lb.home.nl. 84321 A 217.123.132.1
        ubr4-ca5-0-sec.landg1.lb.home.nl. 84321 A 10.221.110.1
        ubr4-ca5-0-sec.landg1.lb.home.nl. 84321 A 10.243.112.1

This may be a C-ares/adig quirk; the order shown above is not the order
received in the DNS response. But curl tries the 10.221.110.1 address first.
This doesn't work since my subnet is 10.x and the host is in Holland!

But curl gives up on the first failure. Shouldn't it try the 82.x and 217.x
addresses too?

I also tried
curl -v http://10.221.110.1 http://10.243.112.1

which also failed on the 1st URL as if '-f' had been used.

All this was with C-ares and no IPv6.

--gv
Received on 2004-06-08