cURL / Mailing Lists / curl-library / Single Mail


Re: round robin DNS without Ares only takes first IP

From: Daniel Stenberg <>
Date: Mon, 25 Apr 2005 13:45:00 +0200 (CEST)

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).

   Commercial curl and libcurl Technical Support:
Received on 2005-04-25