]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Remove conditionals compilation for P2MP, ENABLE_SHAPER and TIME_BACKTRACK_PROTECTION
authorArne Schwabe <arne@rfc2549.org>
Sun, 4 Apr 2021 11:06:02 +0000 (13:06 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 5 Apr 2021 10:58:55 +0000 (12:58 +0200)
commit725dda00f809e5d9768a1aa33c8e73f2e38d9a7e
treeed53fee1ce5fa268f809205fe3f391b67c465527
parentf3c7698957483e0ea0f14e712502d34c826c53ca
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>
22 files changed:
src/compat/compat-gettimeofday.c
src/openvpn/forward.c
src/openvpn/forward.h
src/openvpn/helper.c
src/openvpn/init.c
src/openvpn/manage.c
src/openvpn/mbuf.c
src/openvpn/mbuf.h
src/openvpn/openvpn.h
src/openvpn/options.c
src/openvpn/options.h
src/openvpn/otime.c
src/openvpn/otime.h
src/openvpn/pool.c
src/openvpn/pool.h
src/openvpn/push.c
src/openvpn/push.h
src/openvpn/pushlist.h
src/openvpn/route.h
src/openvpn/shaper.c
src/openvpn/shaper.h
src/openvpn/syshead.h