After some discussion among the core community developers [1,2], it was
decided to remove the possibility to build openvpn as a pure client.
This was alterted on the mailing list [3] that it was scheduled for
removal unless anyone had strong arguments why it was needed.
The general consensus was that we had not received any strong arguments
to keep this possibility after approximately 5 months, so it was fine to
remove this ./configure option.
By removing this, we remove quite some entangled sections of #ifdef
scattered all over the code base, making it more readable.
One note:
Inside the options_postprocess_mutate_invariant() function,
the #ifdef P2MP_SERVER and #ifdef _WIN32 blocks where slightly
reworked to make the _WIN32 block more continous and avoiding having an
empty if(options->mode == MODE_SERVER) block.
Signed-off-by: David Sommerseth
[1]
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18830.html
[2]
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19505.html
[3]
https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18829.html
---
configure.ac| 8
doc/doxygen/openvpn.doxyfile.in | 2 +-
src/openvpn/forward.c | 5 +
src/openvpn/helper.c| 8
src/openvpn/init.c | 14 --
src/openvpn/list.c | 8
src/openvpn/list.h | 3 ---
src/openvpn/misc.c | 4
src/openvpn/misc.h | 3 ---
src/openvpn/mroute.c| 8
src/openvpn/mroute.h| 3 ---
src/openvpn/mtcp.c | 4
src/openvpn/mtcp.h | 3 ---
src/openvpn/mudp.c | 3 ---
src/openvpn/mudp.h | 5 +
src/openvpn/multi.c | 9 -
src/openvpn/multi.h | 3 ---
src/openvpn/openvpn.c | 2 --
src/openvpn/openvpn.h | 5 -
src/openvpn/options.c | 32 ++--
src/openvpn/options.h | 4
src/openvpn/push.c | 14 --
src/openvpn/push.h | 2 --
src/openvpn/pushlist.h | 5 ++---
src/openvpn/schedule.c | 3 ---
src/openvpn/schedule.h | 3 ---
src/openvpn/ssl.c | 4
src/openvpn/ssl_common.h| 4
src/openvpn/ssl_mbedtls.c | 2 --
src/openvpn/ssl_openssl.c | 2 --
src/openvpn/ssl_verify.c| 2 --
src/openvpn/ssl_verify.h| 2 --
src/openvpn/syshead.h | 16 +---
src/openvpn/vlan.c | 4
src/openvpn/vlan.h | 4
35 files changed, 12 insertions(+), 191 deletions(-)
diff --git a/configure.ac b/configure.ac
index a47ef3e7..59b1ed15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,13 +91,6 @@ AC_ARG_ENABLE(
[enable_x509_alt_username="no"]
)
-AC_ARG_ENABLE(
- [server],
- [AS_HELP_STRING([--disable-server], [disable server support only (but
retain client support) @<:@default=yes@:>@])],
- ,
- [enable_server="yes"]
-)
-
AC_ARG_ENABLE(
[plugins],
[AS_HELP_STRING([--disable-plugins], [disable plug-in support
@<:@default=yes@:>@])],
@@ -1218,7 +1211,6 @@ if test "${enable_x509_alt_username}" = "yes"; then
fi
test "${ac_cv_header_sys_uio_h}" = "yes" && AC_DEFINE([HAVE_IOVEC], [1],
[struct iovec needed for IPv6 support])
-test "${enable_server}" = "no" && AC_DEFINE([ENABLE_CLIENT_ONLY], [1], [Enable
client capability only])
test "${enable_management}" = "yes" && AC_DEFINE([ENABLE_MANAGEMENT], [1],
[Enable management server capability])
test "${enable_multihome}" = "yes" && AC_DEFINE([ENABLE_MULTIHOME], [1],
[Enable multi-homed UDP server capability])
test "${enable_debug}" = "yes" && AC_DEFINE([ENABLE_DEBUG], [1], [Enable
debugging support])
diff --git a/doc/doxygen/openvpn.doxyfile.in b/doc/doxygen/openvpn.doxyfile.in
index d9e9ed08..beb02d96 100644
--- a/doc/doxygen/openvpn.doxyfile.in
+++ b/doc/doxygen/openvpn.doxyfile.in
@@ -235,7 +235,7 @@ EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES= YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
-PREDEFINED = _WIN32 NTLM USE_LZO ENABLE_FRAGMENT P2MP P2MP_SERVER
ENABLE_CRYPTO_OPENSSL ENABLE_PLUGIN ENABLE_MANAGEMENT ENABLE_OCC
HAVE_GETTIMEOFDAY
+PREDEFINED = _WIN32 NTLM USE_LZO ENABLE_FRAGMENT P2MP
ENABLE_CRYPTO_OPENSSL ENABLE_PLUGIN ENABLE_MANAGEMENT ENABLE_OCC
HAVE_GETTIMEOFDAY
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---
diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c
index ea10f0bf..dd6bbc69 100644
--- a/src/openvpn/forward.c
+++ b/src/openvpn/forward.c
@@ -682,7 +682,6 @@ encrypt_sign(struct context *c, bool comp_frag)
const uint8_t *orig_buf = c->c2.buf.data;
struct crypto_options *co = NULL;
-#if P2MP_SERVER
/*