summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-23 17:56:39 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-24 18:39:29 +0200
commit23c4174fcdd35a04da78374c095ef58e84a86081 (patch)
treeb1d7322a1e60bf7079d3078d1f690977d6b2750d /app/src/main/java
parent5754df6b71cede9b14542b111397f05ce3610be2 (diff)
libwg-go: reenable sticky sockets, just slightly less sticky
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/wireguard/android/backend/GoBackend.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/backend/GoBackend.java b/app/src/main/java/com/wireguard/android/backend/GoBackend.java
index d11802f3..f9dca4c5 100644
--- a/app/src/main/java/com/wireguard/android/backend/GoBackend.java
+++ b/app/src/main/java/com/wireguard/android/backend/GoBackend.java
@@ -51,6 +51,10 @@ public final class GoBackend implements Backend {
private static native int wgGetSocketV6(int handle);
+ private static native void wgPutSocketV4(int handle);
+
+ private static native void wgPutSocketV6(int handle);
+
private static native void wgTurnOff(int handle);
private static native int wgTurnOn(String ifName, int tunFd, String settings);
@@ -186,7 +190,9 @@ public final class GoBackend implements Backend {
currentTunnel = tunnel;
service.protect(wgGetSocketV4(currentTunnelHandle));
+ wgPutSocketV4(currentTunnelHandle);
service.protect(wgGetSocketV6(currentTunnelHandle));
+ wgPutSocketV6(currentTunnelHandle);
} else {
Log.i(TAG, "Bringing tunnel down");