diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-04-30 22:56:09 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-04-30 22:56:09 +0200 |
commit | 529dec2494c87181899d3479c5d631f5a84f715e (patch) | |
tree | 375f387d4f4cc0a3e39e86d9b6f86155e3dbae84 /src/de/blinkt/openvpn/OpenVpnService.java | |
parent | f1352bae221176125b52f60761cd4651c8c3f4da (diff) |
Version 0.4.6 - Codename "Welcome to the world people in 2012, where we use CIDR"
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVpnService.java')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnService.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java index 8da49bad..442fd94c 100644 --- a/src/de/blinkt/openvpn/OpenVpnService.java +++ b/src/de/blinkt/openvpn/OpenVpnService.java @@ -202,7 +202,11 @@ public class OpenVpnService extends VpnService implements Handler.Callback { for (CIDRIP route:mRoutes) { - builder.addRoute(route.mIp, route.len); + try { + builder.addRoute(route.mIp, route.len); + } catch (IllegalArgumentException ia) { + OpenVPN.logMessage(0, "", getString(R.string.route_rejected) + route + " " + ia.getLocalizedMessage()); + } } if(mDomain!=null) @@ -243,6 +247,9 @@ public class OpenVpnService extends VpnService implements Handler.Callback { public void setLocalIP(String local, String netmask) { mLocalIP = new CIDRIP(local, netmask); + if(mLocalIP.len == 32 && !netmask.equals("255.255.255.255")) { + OpenVPN.logMessage(0, "", String.format(getString(R.string.ip_not_cidr, local,netmask))); + } } |