> Ah, ok then I was wrong.

Yes, I use the same application with IPv6-enabled libcurl on different Linux 
kernel versions (both with IPv6 enabled and disabled on kernel level) for 
different embedded devices and some of them  (pretty recent 4.x, actually) show 
IPv6 socket delay failures.

Some kernel configurations show delays if IPv6 is not enabled in the kernel and 
some if IPv6 is not set on the network interface.
These kernels come from SOC vendors, and I can't debug and modify them to make 
IPv6 socket calls fail more quickly.

> Another approach could then perhaps be to make curl deal with such failures 
> in a better/fallback way to avoid needing the dynamic "ipv6-works" flag ?

Not sure, if I understand how curl can deal better with such problems.

The "IPv6 works" check (if it returns "false") allows to avoid Happy Eyeballs 
timeout delays during dual-stack connection establishment for cases when IPv6 
doesn't work on a system level.
It disables dual-stack on the multi handle and all connections are established 
using IPv4 afterwards.

And the "system level" may cover a quite wide range of cases - IPv6 is disabled 
on kernel level, IPv6 address is disabled on network interface(s),  IPv6 
connectivity check failed and system disabled in some configuration parameters 
etc.

To cover such a range of cases, curl application needs a more flexible approach 
for detection whether IPv6 works on the "system level".
And I guess the "curl_global_init_ipv6() with callback" provides such 
flexibility and allows to satisfy a wide range of application-specific needs.

Thanks,
Dmitry Karpov


-----Original Message-----
From: curl-library <curl-library-boun...@lists.haxx.se> On Behalf Of Daniel 
Stenberg via curl-library
Sent: Tuesday, September 20, 2022 12:05 AM
To: Daniel F via curl-library <curl-library@lists.haxx.se>
Cc: Daniel Stenberg <dan...@haxx.se>
Subject: [EXTERNAL] Re: Feature request: provide ability to set a global 
callback function telling libcurl if IPv6 works on the system

On Tue, 20 Sep 2022, Daniel F via curl-library wrote:

> This is not true. Application can be built using curl with IPv6 
> enabled (e.g. using RedHat 8 base docker image), then executed on 
> another system/machine with IPv6 disabled. If I remember correctly, 
> attempt to create IPv6 socket failed with error.

Ah, ok then I was wrong.

Another approach could then perhaps be to make curl deal with such failures in 
a better/fallback way to avoid needing the dynamic "ipv6-works" flag ?

-- 

  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
--
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to