diff options
author | Arne Schwabe | 2021-04-04 13:06:02 +0200 |
---|---|---|
committer | Gert Doering | 2021-04-05 12:58:55 +0200 |
commit | 725dda00f809e5d9768a1aa33c8e73f2e38d9a7e (patch) | |
tree | ed53fee1ce5fa268f809205fe3f391b67c465527 /src/openvpn/pool.c | |
parent | f3c7698957483e0ea0f14e712502d34c826c53ca (diff) | |
download | openvpn-725dda00f809e5d9768a1aa33c8e73f2e38d9a7e.zip openvpn-725dda00f809e5d9768a1aa33c8e73f2e38d9a7e.tar.gz |
Remove conditionals compilation for P2MP, ENABLE_SHAPER and TIME_BACKTRACK_PROTECTION
Using OpenVPN without P2MP support (pull, TLS) is unrealistic and
building a binary without it is not something we realistically want
to support anyway. Building P2MP support currently only depended
on HAVE_GETTIMEOFDAY or _WIN32, which has a compat function for it.
So we basically can assume that gettimeofday is always availabe,
either natively or through our compat function.
Remove all the #ifdef P2MP logic, simplify code and reduce maintenance
effort.
This also removes the ENABLE_SHAPER and TIME_BACKTRACK_PROTECTION
defines, which also depended only on the HAVE_GETTIMEOFDAY or _WIN32.
I kept the configure.ac check and ifdef in compat since mingw actually
provides a gettimeofday and we will use that instead of our own compat
function.
Patch V2: Remove dco parts that slipped into the patch, mention the
other removed defines that are always enabled.
Patch V3: Also remove the TIME_BACKTRACK_PROTECTION defines from otime.h
Message-Id: <20210403184626.23067-1-arne@rfc2549.org>
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20210404110602.20374-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22030.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/pool.c')
-rw-r--r-- | src/openvpn/pool.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/openvpn/pool.c b/src/openvpn/pool.c index ece0784..4a300ab 100644 --- a/src/openvpn/pool.c +++ b/src/openvpn/pool.c @@ -37,8 +37,6 @@ #include "memdbg.h" -#if P2MP - static void ifconfig_pool_entry_free(struct ifconfig_pool_entry *ipe, bool hard) { @@ -835,5 +833,3 @@ ifconfig_pool_test(in_addr_t start, in_addr_t end) } #endif /* ifdef IFCONFIG_POOL_TEST */ - -#endif /* if P2MP */ |