Fall back to IPv4 if IPv6 capable but don't have an IPv6 address set
When xrdp is built with IPv6 support it will only fall back to IPv4 if
IPv6 is not supported (EAFNOSUPPORT). However, if the system is IPv6
capable but doesn't have an IPv6 address set (at least inside a FreeBSD
jail) EPROTONOSUPPORT is returned from socket().
(cherry picked from commit 5afbca4954
)
This commit is contained in:
parent
83f9d4ec17
commit
a7115cced2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user