cURL / Mailing Lists / curl-library / Single Mail


Re: Make DNS requests follow the CURLOPT_INTERFACE if c-ares is in use

From: Kim Vandry <vandry_at_TZoNE.ORG>
Date: Mon, 22 Jul 2013 12:26:06 -0400

On 2013-07-18 15:14 , Daniel Stenberg wrote:
> On Thu, 18 Jul 2013, Daniel Stenberg wrote:
>>>> * b9f0e44 curl: Add support for various DNS binding options.
> It does a nasty include of "../lib/inet_pton.h" which is incorrect in
> several ways. curl cannot include libcurl internal headers with a direct
> path like that and it shouldn't include libcurl private headers at all
> (if it isn't a curlx* function). I see this code uses Curl_inet_pton()
> which is an internal libcurl function that shouldn't be used like this
> from curl even though I see you've added the source file to the curl
> build. It should be made into a curlx_ version if that should remain so.

Thanks for the explanation. If the change below if made, I think this
use of inet_pton in the curl tool may no longer be necessary.

> I do however think that you should make CURLOPT_DNS_LOCAL_IP* accept a
> string of the IP address and do the conversion to binary within libcurl
> and not in the application. Seems more in line with similar other
> libcurl options too.

I actually agree with this, and mentioned already that I wasn't fully
comfortable with the current interface. Once again, the reason is that
it is a thin layer over the existing c-ares interface.

I will change it as you suggest.

List admin:
Received on 2013-07-22