diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-05-04 00:28:52 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-05-04 00:28:52 +0200 |
commit | 3a1284b0635257df99840614c153e23ff3d99e80 (patch) | |
tree | 119750363771382ea684ed0f8cff6ac7c767ca1b /openvpn | |
parent | 815eb143e98b57b6cd1f43c7c3007416ed4b1a91 (diff) |
Get vpn list working again, not yet perfect but at least delete works
http://code.google.com/p/android/issues/detail?id=3414 is hunting me :(
Diffstat (limited to 'openvpn')
-rw-r--r-- | openvpn/config.h | 4 | ||||
-rw-r--r-- | openvpn/src/openvpn/jniglue.c | 9 | ||||
-rw-r--r-- | openvpn/src/openvpn/tun.c | 3 |
3 files changed, 13 insertions, 3 deletions
diff --git a/openvpn/config.h b/openvpn/config.h index 3dfeffc2..65193a6b 100644 --- a/openvpn/config.h +++ b/openvpn/config.h @@ -24,7 +24,7 @@ #define EMPTY_ARRAY_SIZE 0 /* Enable client capability only */ -/* #undef ENABLE_CLIENT_ONLY */ +#define ENABLE_CLIENT_ONLY 1 /* Enable client/server capability */ #define ENABLE_CLIENT_SERVER 1 @@ -42,7 +42,7 @@ #define ENABLE_MANAGEMENT 1 /* Enable multi-homed UDP server capability */ -#define ENABLE_MULTIHOME 1 +#define ENABLE_MULTIHOME 0 /* Allow --askpass and --auth-user-pass passwords to be read from a file */ #define ENABLE_PASSWORD_SAVE 1 diff --git a/openvpn/src/openvpn/jniglue.c b/openvpn/src/openvpn/jniglue.c index c0fff12b..b7167051 100644 --- a/openvpn/src/openvpn/jniglue.c +++ b/openvpn/src/openvpn/jniglue.c @@ -136,6 +136,15 @@ int android_open_tun () { } + +unsigned char android_protect_socket(int sockfd) { + jmethodID aMethodID = (*openvpnjenv)->GetStaticMethodID(openvpnjenv, openvpnclass, "protectSocket", + "(I)Z"); + return (*openvpnjenv)->CallStaticBooleanMethod(openvpnjenv,openvpnclass,aMethodID,sockfd); + +} + + void android_set_dns(const char* dns) { jmethodID aMethodID = (*openvpnjenv)->GetStaticMethodID(openvpnjenv, openvpnclass, "addDns", "(Ljava/lang/String;)V"); diff --git a/openvpn/src/openvpn/tun.c b/openvpn/src/openvpn/tun.c index 14ec2b85..238d9fba 100644 --- a/openvpn/src/openvpn/tun.c +++ b/openvpn/src/openvpn/tun.c @@ -1386,7 +1386,8 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu if(tt->options.domain) android_set_domain(tt->options.domain); - if((tt->fd = android_open_tun()< 0){ + + if((tt->fd = android_open_tun())< 0){ msg (M_ERR, "ERROR: Cannot open TUN"); } } |