summaryrefslogtreecommitdiff
path: root/lib/hostip.h
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2021-08-03 03:03:00 -0400
committerJay Satiro <raysatiro@yahoo.com>2021-08-10 03:29:49 -0400
commit16e9c8e9909fc12c3f9735f666b5a8c5af669e8b (patch)
treee745c87344895b2d53bc024787cd2dd1bd11e3bf /lib/hostip.h
parent26f93cf0388c36b78fda93353f9b76068308bbd8 (diff)
downloadcurl-16e9c8e9909fc12c3f9735f666b5a8c5af669e8b.tar.gz
hostip: Make Curl_ipv6works function independent of getaddrinfo
- Do not assume IPv6 is not working when getaddrinfo is not present. The check to see if IPv6 actually works is now independent of whether there is any resolver that can potentially resolve a hostname to IPv6. Prior to this change if getaddrinfo() was not found at compile time then Curl_ipv6works() would be defined as a macro that returns FALSE. When getaddrinfo is not found then libcurl is built with CURLRES_IPV4 defined instead of CURLRES_IPV6, meaning that it cannot do IPv6 lookups in the traditional way. With this commit if libcurl is built with IPv6 support (ENABLE_IPV6) but without getaddrinfo (CURLRES_IPV6), and the IPv6 stack is actually working, then it is possible for libcurl to resolve IPv6 addresses by using DoH. Ref: https://github.com/curl/curl/issues/7483#issuecomment-890765378 Closes https://github.com/curl/curl/pull/7529
Diffstat (limited to 'lib/hostip.h')
-rw-r--r--lib/hostip.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hostip.h b/lib/hostip.h
index 28f3b8401..67a688aeb 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -97,7 +97,7 @@ enum resolve_t Curl_resolv_timeout(struct Curl_easy *data,
struct Curl_dns_entry **dnsentry,
timediff_t timeoutms);
-#ifdef CURLRES_IPV6
+#ifdef ENABLE_IPV6
/*
* Curl_ipv6works() returns TRUE if IPv6 seems to work.
*/