diff options
author | Arne Schwabe <arne@rfc2549.org> | 2014-02-16 18:29:33 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2014-02-16 18:29:33 +0100 |
commit | 71fa8e23a892c603b27f33b4871ce9ed44c178e2 (patch) | |
tree | 5f0b1e64e9a78d45d47b90510b00609d59282f1e | |
parent | 9a06c0782ca5acb533c5f6bbcf242516cb858801 (diff) |
Fxi some other bugs reports from the reports
3 files changed, 7 insertions, 3 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java index 22cc5dce..8e1873ea 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java +++ b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java @@ -632,9 +632,9 @@ public class ConfigParser { private void checkRedirectParameters(VpnProfile np, Vector<Vector<String>> defgw) { for (Vector<String> redirect: defgw) for (int i=1;i<redirect.size();i++){ - if (defgw.get(i).equals("block-local")) + if (redirect.get(i).equals("block-local")) np.mAllowLocalLAN=false; - else if (defgw.get(i).equals("unblock-local")) + else if (redirect.get(i).equals("unblock-local")) np.mAllowLocalLAN=true; } } diff --git a/main/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java b/main/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java index 250edf42..68b30bce 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java +++ b/main/src/main/java/de/blinkt/openvpn/core/DeviceStateReceiver.java @@ -108,7 +108,7 @@ public class DeviceStateReceiver extends BroadcastReceiver implements ByteCountL boolean screenOffPause = prefs.getBoolean("screenoff", false);
if (screenOffPause) {
- if (!ProfileManager.getLastConnectedVpn().mPersistTun)
+ if (ProfileManager.getLastConnectedVpn()!=null && !ProfileManager.getLastConnectedVpn().mPersistTun)
VpnStatus.logError(R.string.screen_nopersistenttun);
screen = connectState.PENDINGDISCONNECT;
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 bc3fe552..9d6f767e 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnService.java @@ -538,6 +538,10 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac NetworkSpace.ipAddress gatewayIP = new NetworkSpace.ipAddress(new CIDRIP(gateway, 32),false); + if (mLocalIP==null) { + VpnStatus.logError("Local IP address unset but adding route?! This is broken! Please contact author with log"); + return; + } NetworkSpace.ipAddress localNet = new NetworkSpace.ipAddress(mLocalIP,true); if (localNet.containsNet(gatewayIP)) include=true; |