curl-library
Re: [PATCH]: allow clients to set the name servers
Date: Wed, 28 Sep 2011 14:55:18 -0700
On 09/28/2011 02:39 PM, Daniel Stenberg wrote:
> On Thu, 22 Sep 2011, Jason Glasgow wrote:
>
>> The following patch allows users of the Curl library to specify which name servers to use when submitting a request and using c-ares. Otherwise the default
>> name servers are used and that does not always make sense if you have multiple networks.
>>
>> This is against 7.22.0
>
> Thanks, I've seen this requested before and I'm willing to accept this feature. My comments on the patch:
>
> o We need this option documented! (I realize doing a test case for it will
> require a fair amount of trickery)
>
> o It depends on a function (ares_set_servers_csv) in c-ares that was added in
> c-ares 1.7.4 which is very recent and lots of users will not have as recent
> version. We need some header magic to make sure we build and run fine with
> older libs tool. Also, can't that function fail?
>
> o The ares_set_servers_csv() function wants a char * so shouldn't you get that
> with va_arg isntead of a void * ? I realize there isn't much of a difference
> in the outcome, but the code would look clearer as I see things.
Last time I posted a similar patch, I think it was requested that the
option name be more generic. I ended up with CURLOPT_DNS_SERVERS, just in
case some day it supports more than just c-ares.
But, it doesn't matter to me either way.
I've got some patches to set the c-ares IP addresses and interface
names a well..will post those after this patch is merged.
Thanks,
Ben
-- Ben Greear <greearb_at_candelatech.com> Candela Technologies Inc http://www.candelatech.com ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-09-28