cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

round robin DNS without Ares only takes first IP

From: A Nonymous <anon_at_ymous.none>
Date: Wed, 27 Apr 2005 16:17:49 +0200

Daniel Stenberg wrote:

> On Mon, 25 Apr 2005, A Nonymous wrote:
>
>> The following is an excerpt of hostip.c
>> Would you find it appropriate to check an option set in the session
>> data and randomize the entryies before assigning them in
>> dns->addr = addr; /* this is the address(es) */
>
> No, that's the place that stores the data in the cache.
>
> The right place would probably be in Curl_resolv() when a cached
> content is used and while the cache is locked and only if the returned
> address isn't in use by someone else (the ->inuse counter hints about
> that).

In my case several threads use this single address permanently.
What do you think of this:
We do a for-loop over the address chain in Curl_connecthost() in
connect.c (CVS-revision 1.130: line 789)
Alternatively I could count the number of addresses, choose the
starting address, jump to the head after reaching the tail and terminate
the loop when reaching the starting address again.
Unless a certain option is set the starting address will be the head itself.

looking forward to you comments
A Nonymous
Received on 2005-04-27

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET