mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:43:32 +03:00
ares: store dns parameters for duphandle
With c-ares the dns parameters lives in ares_channel. Store them in the
curl handle and set them again in easy_duphandle.
Regression introduced in #3228 (6765e6d), shipped in curl 7.63.0.
Fixes #4893
Closes #5020
Signed-off-by: Ernst Sjöstrand <ernst.sjostrand@verisure.com>
This commit is contained in:
parent
e364546fb3
commit
c8f086bcc3
3 changed files with 37 additions and 4 deletions
24
lib/setopt.c
24
lib/setopt.c
|
|
@ -2583,16 +2583,32 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
|
|||
#endif
|
||||
#ifdef USE_ARES
|
||||
case CURLOPT_DNS_SERVERS:
|
||||
result = Curl_set_dns_servers(data, va_arg(param, char *));
|
||||
result = Curl_setstropt(&data->set.str[STRING_DNS_SERVERS],
|
||||
va_arg(param, char *));
|
||||
if(result)
|
||||
return result;
|
||||
result = Curl_set_dns_servers(data, data->set.str[STRING_DNS_SERVERS]);
|
||||
break;
|
||||
case CURLOPT_DNS_INTERFACE:
|
||||
result = Curl_set_dns_interface(data, va_arg(param, char *));
|
||||
result = Curl_setstropt(&data->set.str[STRING_DNS_INTERFACE],
|
||||
va_arg(param, char *));
|
||||
if(result)
|
||||
return result;
|
||||
result = Curl_set_dns_interface(data, data->set.str[STRING_DNS_INTERFACE]);
|
||||
break;
|
||||
case CURLOPT_DNS_LOCAL_IP4:
|
||||
result = Curl_set_dns_local_ip4(data, va_arg(param, char *));
|
||||
result = Curl_setstropt(&data->set.str[STRING_DNS_LOCAL_IP4],
|
||||
va_arg(param, char *));
|
||||
if(result)
|
||||
return result;
|
||||
result = Curl_set_dns_local_ip4(data, data->set.str[STRING_DNS_LOCAL_IP4]);
|
||||
break;
|
||||
case CURLOPT_DNS_LOCAL_IP6:
|
||||
result = Curl_set_dns_local_ip6(data, va_arg(param, char *));
|
||||
result = Curl_setstropt(&data->set.str[STRING_DNS_LOCAL_IP6],
|
||||
va_arg(param, char *));
|
||||
if(result)
|
||||
return result;
|
||||
result = Curl_set_dns_local_ip6(data, data->set.str[STRING_DNS_LOCAL_IP6]);
|
||||
break;
|
||||
#endif
|
||||
case CURLOPT_TCP_KEEPALIVE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue