common: add --enable-ipv6only option
This commit is contained in:
parent
5bc0453605
commit
536ee41c5e
@ -479,7 +479,11 @@ g_tcp_socket(void)
|
|||||||
{
|
{
|
||||||
if (option_value != 0)
|
if (option_value != 0)
|
||||||
{
|
{
|
||||||
|
#if defined(XRDP_ENABLE_IPV6ONLY)
|
||||||
|
option_value = 1;
|
||||||
|
#else
|
||||||
option_value = 0;
|
option_value = 0;
|
||||||
|
#endif
|
||||||
option_len = sizeof(option_value);
|
option_len = sizeof(option_value);
|
||||||
if (setsockopt(rv, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&option_value,
|
if (setsockopt(rv, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&option_value,
|
||||||
option_len) < 0)
|
option_len) < 0)
|
||||||
|
@ -32,6 +32,9 @@ AM_CONDITIONAL(SESMAN_NOPAM, [test x$enable_pam != xyes])
|
|||||||
AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--enable-ipv6],
|
AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--enable-ipv6],
|
||||||
[Build IPv6 support (default: no, experimental)]),
|
[Build IPv6 support (default: no, experimental)]),
|
||||||
[], [enable_ipv6=no])
|
[], [enable_ipv6=no])
|
||||||
|
AC_ARG_ENABLE(ipv6only, AS_HELP_STRING([--enable-ipv6only],
|
||||||
|
[Build IPv6-only (default: no)]),
|
||||||
|
[], [enable_ipv6only=no])
|
||||||
AC_ARG_ENABLE(kerberos, AS_HELP_STRING([--enable-kerberos],
|
AC_ARG_ENABLE(kerberos, AS_HELP_STRING([--enable-kerberos],
|
||||||
[Build kerberos support (default: no)]),
|
[Build kerberos support (default: no)]),
|
||||||
[], [enable_kerberos=no])
|
[], [enable_kerberos=no])
|
||||||
@ -106,6 +109,12 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_ipv6only" = "xyes"
|
||||||
|
then
|
||||||
|
enable_ipv6=yes
|
||||||
|
AC_DEFINE([XRDP_ENABLE_IPV6ONLY],1,[Enable IPv6 only])
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$enable_ipv6" = "xyes"
|
if test "x$enable_ipv6" = "xyes"
|
||||||
then
|
then
|
||||||
AC_DEFINE([XRDP_ENABLE_IPV6],1,[Enable IPv6])
|
AC_DEFINE([XRDP_ENABLE_IPV6],1,[Enable IPv6])
|
||||||
|
Loading…
Reference in New Issue
Block a user