On Tue, 2022-11-22 at 20:32 +0000, Dmitry Karpov via curl-library wrote: > If your use dual-stack libcurl, then you probably will need to run > two "connectivity" tests - one for "IPv4 only" mode and the other for > dual-stack "IPv6/IPv4". > That's because you may have issues with IPv6 when IPv4 is working > well. >
In my experience it's been more common recently to see it the other way round — IPv6 works fine, while Legacy IP is not working. You definitely need to allow for both scenarios. Don't be one of those applications which fails when Legacy IP is down, while everything else just continues to work over IPv6. > In this case, you have only "IPv4 connectivity" and thus need to make > your dual-stack applications use "IPv4 only" mode. You shouldn't need to do that for yourself. If a target host has multiple IP addresses, libraries like curl should automatically try them *all* in order of preference without the *application* code having to get involved. > (Of course, if you decide that your applications always use IPv4, > then you need to run only "IPv4 connectivity" tests and explicitly > set "IPv4 only" mode in your apps). I'd definitely not recommend that. Even if your server is stuck in the 20th century and only supports Legacy IP, you may find that client devices are on IPv6-only networks using NAT64. So a successful connection might be seen by the *server* as running over Legacy IP, while the client believes it's using IPv6. If I tether to my mobile phone over a USB cable, that's precisely the connectivity mode I get. So especially don't limit *clients* to Legacy IP, if they're mobile applications or even devices. I have devices in my collection which Just Work over NAT64 despite the actual creators of those devices having no idea that they're living in the 21st century. They didn't think about IPv6 at all, but the underlying OS and libraries all just do the right thing, and connectivity to their Legacy-IP-only service just works anyway. Don't go out of your way to *break* that.
smime.p7s
Description: S/MIME cryptographic signature
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html