From 0ba5e06882ecb4dd2368aa66d96936da9f29ecc5 Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Thu, 20 Aug 2020 14:24:41 +0000 Subject: [PATCH] cli.cpp: use SITNL on Linux by default Macro OPENVPN_USE_SITNL should be defined before inclusion of client/ovpncli.cpp. Include tuncli.hpp for consistency with mac-specific code below. Signed-off-by: Lev Stipakov --- test/ovpncli/cli.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/ovpncli/cli.cpp b/test/ovpncli/cli.cpp index ca73ced3..2d37aa47 100644 --- a/test/ovpncli/cli.cpp +++ b/test/ovpncli/cli.cpp @@ -53,6 +53,11 @@ // don't export core symbols #define OPENVPN_CORE_API_VISIBILITY_HIDDEN +// use SITNL on Linux by default +#if defined(OPENVPN_PLATFORM_LINUX) && !defined(OPENVPN_USE_IPROUTE2) && !defined(OPENVPN_USE_SITNL) +#define OPENVPN_USE_SITNL +#endif + // should be included before other openvpn includes, // with the exception of openvpn/log includes #include @@ -87,17 +92,13 @@ #if defined(OPENVPN_PLATFORM_LINUX) -// use SITNL by default -#if !defined(OPENVPN_USE_IPROUTE2) && !defined(OPENVPN_USE_SITNL) -#define OPENVPN_USE_SITNL -#endif - #include // we use a static polymorphism and define a // platform-specific TunSetup class, responsible // for setting up tun device #define TUN_CLASS_SETUP TunLinuxSetup::Setup +#include #elif defined(OPENVPN_PLATFORM_MAC) #include #define TUN_CLASS_SETUP TunMac::Setup