cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 18 Jul 2013 21:14:58 +0200 (CEST)

On Thu, 18 Jul 2013, Daniel Stenberg wrote:

>>> * b9f0e44 curl: Add support for various DNS binding options.
>>
>> It seems to collide with existing test case numbers!
>
> Uh, sorry, my mistake. It applies just fine, but I would still prefer a
> single IP option for libcurl and then I guess this would need some minor
> adjustment...

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.

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.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-18