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/socket.c | |
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/socket.c')
-rw-r--r-- | src/openvpn/socket.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 8eb112b..94d2b10 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -38,6 +38,7 @@ #include "ps.h" #include "manage.h" #include "misc.h" +#include "manage.h" #include "memdbg.h" @@ -725,6 +726,15 @@ create_socket (struct link_socket *sock) { ASSERT (0); } +#ifdef TARGET_ANDROID + /* pass socket FD to management interface to pass on to VPNService API + * as "protected socket" (exempt from being routed into tunnel) + */ + + management->connection.fdtosend = sock->sd; + management_android_control (management, "PROTECTFD", __func__); +#endif + } /* |