cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multihomed connections

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Wed, 9 Jun 2004 18:12:59 +0200

"Daniel Stenberg" <daniel-curl_at_haxx.se> said:

> I think it makes most sense to have CURLOPT_CONNECTTIME affect all IPs tried,
> so that -c10 means 10 seconds no matter how many IP addresses the name might
> resolve to.

> I remember this problem, and as far as I remember it, we haven't found a fix
> for this. If the connect code believes it has a good connect to the host, it
> will continue to do protocol-specific stuff (which in this case means
> attempting to read the FTP server response). The question is why it believes
> that it is connected!

I now disabled the built-in ICF firewall in Win-XP and curl behaves as expected.
Allthough tcpdump doesn't show any connections, Winsock seems to be
fooled by ICF?!

I did a patch that now looks like:

* About to connect() to ubr4-ca5-0-sec.landg1.lb.home.nl port 80
* trying 82.73.204.1... * Connection refused
* trying 217.121.93.1... * Connection refused
* trying 217.122.53.1... * Connection refused
* trying 217.123.132.1... * Connection refused
* trying 10.221.110.1... * No error
* trying 82.72.140.1... * Connection refused
* trying 10.243.112.1... * No error
* Closing connection #0
curl: (7) couldn't connect

The "No error" is wrong; it should be "Host unreachable". I'll look into why.
And I don't like infof() putting a '*' before the 2nd part of line. Any way to drop
that?

BTW. I'd like to rewrite Curl_printable_address() so avoiding the #ifdef'ing
where it's called. I.e.
const char *Curl_printable_address (const Curl_addrinfo *, char*, size_t);

--gv
Received on 2004-06-09