diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-04-30 21:29:11 +0200 |
---|---|---|
committer | Gert Doering <gert@greenie.muc.de> | 2013-05-01 12:25:23 +0200 |
commit | a55b3cdb236ebfd181c24f54ead4b4c27c7bdda7 (patch) | |
tree | ab6cc8db16f4a3b71fc7f37b59763f22ca094dd1 /src/openvpn/tun.h | |
parent | ad2df7b983eadbdc81fe0cf92543cad27b8f8882 (diff) | |
download | openvpn-a55b3cdb236ebfd181c24f54ead4b4c27c7bdda7.tar.gz openvpn-a55b3cdb236ebfd181c24f54ead4b4c27c7bdda7.tar.xz openvpn-a55b3cdb236ebfd181c24f54ead4b4c27c7bdda7.zip |
Android platform specific changes.
On Android 4.0 (TARGET_ANDROID) the real opening of the tun is handled by
the (Java) application controlling OpenVPN. Instead of calling
ifconfig/route call the management to do the work. When running openvpn as
root openvpn should be compiled as TARGET_LINUX
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1367350151-23089-1-git-send-email-arne@rfc2549.org>
URL: http://article.gmane.org/gmane.network.openvpn.devel/7570
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/tun.h')
-rw-r--r-- | src/openvpn/tun.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/openvpn/tun.h b/src/openvpn/tun.h index 63e4b5c..956ad8d 100644 --- a/src/openvpn/tun.h +++ b/src/openvpn/tun.h @@ -38,7 +38,7 @@ #include "proto.h" #include "misc.h" -#ifdef WIN32 +#if defined(WIN32) || defined(TARGET_ANDROID) #define TUN_ADAPTER_INDEX_INVALID ((DWORD)-1) @@ -292,6 +292,8 @@ ifconfig_order(void) return IFCONFIG_AFTER_TUN_OPEN; #elif defined(WIN32) return IFCONFIG_BEFORE_TUN_OPEN; +#elif defined(TARGET_ANDROID) + return IFCONFIG_BEFORE_TUN_OPEN; #else return IFCONFIG_DEFAULT; #endif @@ -304,7 +306,11 @@ ifconfig_order(void) static inline int route_order(void) { +#if defined(TARGET_ANDROID) + return ROUTE_BEFORE_TUN; +#else return ROUTE_ORDER_DEFAULT; +#endif } |