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 | 2b6c6b1cd53a4ae7c463f299d6114e17e8e1e4aa (patch) | |
tree | 7014966c8017d5a2d72fa5b84ac114e1869f3426 /src/de | |
parent | 22714a5fd15e3250ce0297045985a2267777c692 (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()); |