mirror of https://github.com/neutrinolabs/xrdp
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().
This commit is contained in:
parent
b79a7690fa
commit
5afbca4954
|
@ -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