summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java7
1 files changed, 5 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 32b5288e..66b1f72d 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -806,8 +806,11 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
/* Workaround for Lollipop, it does not route traffic to the VPNs own network mask */
- if (mLocalIP.len <= 31 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
- addRoute(mLocalIP);
+ if (mLocalIP.len <= 31 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ CIDRIP interfaceRoute = new CIDRIP(mLocalIP.mIp, mLocalIP.len);
+ interfaceRoute.normalise();
+ addRoute(interfaceRoute);
+ }
// Configurations are sometimes really broken...