diff --git a/xrdp/xrdp_listen.c b/xrdp/xrdp_listen.c index 33bd1927..b484ff09 100644 --- a/xrdp/xrdp_listen.c +++ b/xrdp/xrdp_listen.c @@ -213,6 +213,12 @@ xrdp_listen_get_startup_params(struct xrdp_listen *self) val = (char *)list_get_item(values, index); startup_params->tcp_recv_buffer_bytes = g_atoi(val); } + + if (g_strcasecmp(val, "use_vsock") == 0) + { + val = (char *)list_get_item(values, index); + startup_params->use_vsock = g_text2bool(val); + } } } } @@ -546,6 +552,23 @@ xrdp_listen_pp(struct xrdp_listen *self, int *index, *index = lindex; return 0; } + else if ((str[0] >= '0') && (str[0] <= '9')) + { + g_strncpy(address, "0.0.0.0", 127); + bytes = xrdp_listen_parse_integer(port, 128, str, str_end - str); + str += bytes; + lindex += bytes; + if (startup_params->use_vsock) + { + *mode = TRANS_MODE_VSOCK; + } + else + { + *mode = TRANS_MODE_TCP; + } + *index = lindex; + return 0; + } else { str++; diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h index 856162c6..d164f95b 100644 --- a/xrdp/xrdp_types.h +++ b/xrdp/xrdp_types.h @@ -537,6 +537,7 @@ struct xrdp_startup_params int tcp_recv_buffer_bytes; int tcp_nodelay; int tcp_keepalive; + int use_vsock; }; /*