Merge pull request #2967 from derekschrock/ipv6

Fall back to IPv4 if IPv6 capable but don't have an IPv6 address set
This commit is contained in:
matt335672 2024-02-26 09:28:57 +00:00 committed by GitHub
commit 5845ce7c16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -378,6 +378,7 @@ g_tcp_socket(void)
{
switch (errno)
{
case EPROTONOSUPPORT: /* if IPv6 is supported, but don't have an IPv6 address */
case EAFNOSUPPORT: /* if IPv6 not supported, retry IPv4 */
LOG(LOG_LEVEL_INFO, "IPv6 not supported, falling back to IPv4");
rv = (int)socket(AF_INET, SOCK_STREAM, 0);