diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-06-22 11:14:09 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-06-22 11:14:09 +0200 |
commit | ae16cd6ee254a9d5adb910ca84c01a09751558f6 (patch) | |
tree | 25769d7cf1b7560f8802405f847baa5a52e22e7a /src/de | |
parent | 58db582ea324ef99ea37ff196e242c51592b6356 (diff) |
Fix openvpn error when no netmask is specified to a custom IP
Diffstat (limited to 'src/de')
-rw-r--r-- | src/de/blinkt/openvpn/VpnProfile.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index f482b173..d679cd00 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -385,9 +385,9 @@ public class VpnProfile implements Serializable{ private String cidrToIPAndNetmask(String route) { String[] parts = route.split("/"); - // No /xx, return verbatim + // No /xx, assume /32 as netmask if (parts.length ==1) - return route; + parts = (route + "/32").split("/"); if (parts.length!=2) return null; @@ -480,7 +480,6 @@ public class VpnProfile implements Serializable{ cachain = KeyChain.getCertificateChain(context, mAlias); if(cachain.length <= 1 && !nonNull(mCaFilename)) OpenVPN.logMessage(0, "", context.getString(R.string.keychain_nocacert)); - for(X509Certificate cert:cachain) { OpenVPN.logInfo(R.string.cert_from_keystore,cert.getSubjectDN()); |