diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-23 17:56:39 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-24 18:39:29 +0200 |
commit | 23c4174fcdd35a04da78374c095ef58e84a86081 (patch) | |
tree | b1d7322a1e60bf7079d3078d1f690977d6b2750d /app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/jni.c | |
parent | 5754df6b71cede9b14542b111397f05ce3610be2 (diff) |
libwg-go: reenable sticky sockets, just slightly less sticky
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/jni.c')
-rw-r--r-- | app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/jni.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/jni.c b/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/jni.c index a0f3d0ba..ae6422ab 100644 --- a/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/jni.c +++ b/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/jni.c @@ -10,6 +10,8 @@ extern int wgTurnOn(struct go_string ifname, int tun_fd, struct go_string settin extern void wgTurnOff(int handle); extern int wgGetSocketV4(int handle); extern int wgGetSocketV6(int handle); +extern void wgPutSocketV4(int handle); +extern void wgPutSocketV6(int handle); JNIEXPORT jint JNICALL Java_com_wireguard_android_backend_GoBackend_wgTurnOn(JNIEnv *env, jclass c, jstring ifname, jint tun_fd, jstring settings) { @@ -43,3 +45,13 @@ JNIEXPORT jint JNICALL Java_com_wireguard_android_backend_GoBackend_wgGetSocketV { return wgGetSocketV6(handle); } + +JNIEXPORT void JNICALL Java_com_wireguard_android_backend_GoBackend_wgPutSocketV4(JNIEnv *env, jclass c, jint handle) +{ + wgPutSocketV4(handle); +} + +JNIEXPORT void JNICALL Java_com_wireguard_android_backend_GoBackend_wgPutSocketV6(JNIEnv *env, jclass c, jint handle) +{ + wgPutSocketV6(handle); +} |