summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-08-14 22:57:06 +0200
committerArne Schwabe <arne@rfc2549.org>2014-08-14 22:57:06 +0200
commitf228daf2285886ac3981f48228e2728af37af4bb (patch)
tree21f79e3f2839022b3c9a3b2e7cfcaa4cf6300363 /main/src
parent86a8419dab60b106208210bdcda67e988efe02f1 (diff)
Add workaround for Android bug #70916
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java11
1 files changed, 9 insertions, 2 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 09a2d91e..c55d5b0d 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java
@@ -495,8 +495,15 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
}
}
-
- builder.setMtu(mMtu);
+ 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") && !release.startsWith("4.4.6"))
+ && mMtu < 1280) {
+ VpnStatus.logInfo(String.format("Forcing MTU to 1280 instead of %d to workaround Android Bug #70916", mMtu));
+ builder.setMtu(1280);
+ } else {
+ builder.setMtu(mMtu);
+ }
Collection<ipAddress> positiveIPv4Routes = mRoutes.getPositiveIPList();
Collection<ipAddress> positiveIPv6Routes = mRoutesv6.getPositiveIPList();