cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: best practices: c-ares vs threaded resolver

From: Ben Greear <greearb_at_candelatech.com>
Date: Tue, 17 Sep 2013 09:59:59 -0700

On 09/17/2013 09:46 AM, Gisle Vanem wrote:
> "m brandenberg" <mcbinc_at_panix.com> wrote:
>
>> So these and other issues make me want to use the system resolver
>> library. When it fails, there's a general system/network
>> configuration issue that doesn't become a support issue for us.
>
> I tend to agree. The systems resolver seems alway to work best
> for me. At least when I use a VPN. Then (without messing with my routing-
> table, C-ares is using the default interface which doesn't work). I whish
> there could be a config-file similar to '/etc/resolv.conf' for C-ares/Win.
>
> Besides the new C-ares functions for specifying DNS addr/iface that's
> recently been added to curl does nothing on Windows; '--dns-interface'
> boils down to 'setsockopt (..SO_BINDTODEVICE)' and '--dns-ipvX-addr'
> boils down to a 'bind(..ipvX-addr)' which AFAICS is useful only for those running a DNS-server locally. I doesn't do any good on my Winsock. The
> '--dns-ipvX-addr' option should IMHO be used to specify what DNS-server
> to connect to.

Even on Linux, you might have to play some routing-table tricks to make the bind(local-ip) work
as expected, but at least it can be done.

I have no idea how to make this sort of thing function fully proper on Windows, though
I would expect binding to a local IP might be useful on a multi-homed machine.

I know BSD doesn't have SO_BINDTODEVICE, but I do not know the exact behaviour
of binding to local IP.

Thanks,
Ben

>
> --gv
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-- 
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.html
Received on 2013-09-17