mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
multi: probe for IPv6 functionality in multi_init()
In some legacy systems IPv6 might dynamically work/not work and thus curl needs to check/probe to see if it should indeed be used. This change moves the probe that checks for working IPv6 to the multi handle setup function instead of delaying it to when the first name resolve is performed. This avoids a later tricky error path if the socket cannot be created due to OOM. Closes #20383
This commit is contained in:
parent
4890074e68
commit
e286589c71
4 changed files with 31 additions and 29 deletions
|
|
@ -48,6 +48,7 @@ struct Curl_easy;
|
|||
struct connectdata;
|
||||
struct easy_pollset;
|
||||
struct Curl_https_rrinfo;
|
||||
struct Curl_multi;
|
||||
|
||||
enum alpnid {
|
||||
ALPN_none = 0,
|
||||
|
|
@ -104,11 +105,15 @@ CURLcode Curl_resolv_timeout(struct Curl_easy *data,
|
|||
timediff_t timeoutms);
|
||||
|
||||
#ifdef USE_IPV6
|
||||
|
||||
/* probe if it seems to work */
|
||||
CURLcode Curl_probeipv6(struct Curl_multi *multi);
|
||||
/*
|
||||
* Curl_ipv6works() returns TRUE if IPv6 seems to work.
|
||||
*/
|
||||
bool Curl_ipv6works(struct Curl_easy *data);
|
||||
#else
|
||||
#define Curl_probeipv6(x) CURLE_OK
|
||||
#define Curl_ipv6works(x) FALSE
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue