summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-06-04 12:54:49 +0200
committerArne Schwabe <arne@rfc2549.org>2014-06-04 12:54:49 +0200
commitca7fe0a3dcdcec7d0cfa77bcff26409e84a9fa9a (patch)
treef0e2c712372021b763f1d284eedec1608edd06fa /main
parent91ec580beceb3d6c723d2ade85436374992526f7 (diff)
4.4.3 should fix the bug where two open tun devices wreck the VPN stack
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
index b1f9dbd4..550429a1 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
@@ -740,12 +740,17 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac
public String getTunReopenStatus() {
String currentConfiguration = getTunConfigString();
- if (currentConfiguration.equals(mLastTunCfg))
+ if (currentConfiguration.equals(mLastTunCfg)) {
return "NOACTION";
- else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
- return "OPEN_AFTER_CLOSE";
- else
- return "OPEN_BEFORE_CLOSE";
+ } else {
+ String release = Build.VERSION.RELEASE;
+ if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT && !release.startsWith("4.4.3")
+ && !release.startsWith("4.4.4") && !release.startsWith("4.4.5"))
+ // There will be probably no 4.4.4 or 4.4.5 version, so don't waste effort to do parsing here
+ return "OPEN_AFTER_CLOSE";
+ else
+ return "OPEN_BEFORE_CLOSE";
+ }
}
public class LocalBinder extends Binder {