diff options
author | Ernst Sjöstrand <ernst.sjostrand@verisure.com> | 2020-03-02 14:51:43 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-03-07 13:50:23 +0100 |
commit | c8f086bcc315d9dec6a7438f39c3c36dfeb27e42 (patch) | |
tree | 54ff38ed935d2223daed132bae62f526e2db5e3b /lib/easy.c | |
parent | e364546fb3371ac27f59f897e4c55acce7fc824e (diff) | |
download | curl-c8f086bcc315d9dec6a7438f39c3c36dfeb27e42.tar.gz |
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>
Diffstat (limited to 'lib/easy.c')
-rw-r--r-- | lib/easy.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/easy.c b/lib/easy.c index d1c6cedaa..d3a29f48b 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -883,6 +883,17 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data) data->state.resolver)) goto fail; +#ifdef USE_ARES + if(Curl_set_dns_servers(outcurl, data->set.str[STRING_DNS_SERVERS])) + goto fail; + if(Curl_set_dns_interface(outcurl, data->set.str[STRING_DNS_INTERFACE])) + goto fail; + if(Curl_set_dns_local_ip4(outcurl, data->set.str[STRING_DNS_LOCAL_IP4])) + goto fail; + if(Curl_set_dns_local_ip6(outcurl, data->set.str[STRING_DNS_LOCAL_IP6])) + goto fail; +#endif /* USE_ARES */ + Curl_convert_setup(outcurl); Curl_initinfo(outcurl); |