mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 12:12:15 +02:00
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 <lev@openvpn.net>
This commit is contained in:
parent
648234cc68
commit
0ba5e06882
@ -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 <client/ovpncli.cpp>
|
||||
@ -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 <openvpn/tun/linux/client/tuncli.hpp>
|
||||
|
||||
// we use a static polymorphism and define a
|
||||
// platform-specific TunSetup class, responsible
|
||||
// for setting up tun device
|
||||
#define TUN_CLASS_SETUP TunLinuxSetup::Setup<TUN_LINUX>
|
||||
#include <openvpn/tun/linux/client/tuncli.hpp>
|
||||
#elif defined(OPENVPN_PLATFORM_MAC)
|
||||
#include <openvpn/tun/mac/client/tuncli.hpp>
|
||||
#define TUN_CLASS_SETUP TunMac::Setup
|
||||
|
Loading…
Reference in New Issue
Block a user