summaryrefslogtreecommitdiff
path: root/openvpn/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-05-06 18:13:09 +0200
committerArne Schwabe <arne@rfc2549.org>2012-05-06 18:13:09 +0200
commitef4fd36f5d38e82ba6165be2468d985d62f1d32f (patch)
tree8cd65adb7b37b6c968f39112ba03c3fe5e2f5c3a /openvpn/src
parentec7e6b920257e52a24f9fc56150c05f3bbc6da7d (diff)
Add ability to send the log (closes issue #9)
protect fd over unix socket
Diffstat (limited to 'openvpn/src')
-rw-r--r--openvpn/src/openvpn/jniglue.c17
-rw-r--r--openvpn/src/openvpn/jniglue.h2
-rw-r--r--openvpn/src/openvpn/tun.c4
3 files changed, 3 insertions, 20 deletions
diff --git a/openvpn/src/openvpn/jniglue.c b/openvpn/src/openvpn/jniglue.c
index b7167051..d49fe353 100644
--- a/openvpn/src/openvpn/jniglue.c
+++ b/openvpn/src/openvpn/jniglue.c
@@ -137,14 +137,6 @@ 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");
@@ -154,15 +146,6 @@ void android_set_dns(const char* dns) {
}
-void android_set_domain(const char* domain) {
- jmethodID aMethodID = (*openvpnjenv)->GetStaticMethodID(openvpnjenv, openvpnclass, "addDomain",
- "(Ljava/lang/String;)V");
- jstring jdomain = (*openvpnjenv)->NewStringUTF(openvpnjenv,domain);
- (*openvpnjenv)->CallStaticVoidMethod(openvpnjenv,openvpnclass,aMethodID,jdomain);
-
-
-}
-
void addRouteInformation(const char* dest, const char* mask, const char* gw) {
jstring jmask = (*openvpnjenv)->NewStringUTF(openvpnjenv, mask);
diff --git a/openvpn/src/openvpn/jniglue.h b/openvpn/src/openvpn/jniglue.h
index 7c723ef5..ea60a718 100644
--- a/openvpn/src/openvpn/jniglue.h
+++ b/openvpn/src/openvpn/jniglue.h
@@ -15,6 +15,4 @@ void addInterfaceInformation(int mtu,const char* ifconfig_local, const char* ifc
void android_openvpn_log(int level,const char* prefix,const char* prefix_sep,const char* m1);
void android_openvpn_exit(int status);
void android_set_dns(const char* dns);
-void android_set_domain(const char* domain);
-
#endif
diff --git a/openvpn/src/openvpn/tun.c b/openvpn/src/openvpn/tun.c
index 238d9fba..844d596e 100644
--- a/openvpn/src/openvpn/tun.c
+++ b/openvpn/src/openvpn/tun.c
@@ -1384,8 +1384,10 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, struct tu
android_set_dns(print_in_addr_t(tt->options.dns[i], 0, &gc));
}
+
+
if(tt->options.domain)
- android_set_domain(tt->options.domain);
+ management_query_user_pass(management, &up , "DNSDOMAIN", GET_USER_PASS_NEED_OK,(void*) 0);
if((tt->fd = android_open_tun())< 0){
msg (M_ERR, "ERROR: Cannot open TUN");