summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/blinkt
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/de/blinkt')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
index 5b4ab361..4a8bcf99 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -714,6 +714,10 @@ public class ConfigParser {
Vector<Vector<String>> connectionBlocks = getAllOption("connection", 1, 1);
+ if (connectionBlocks == null && np.mConnections.length == 0) {
+ throw new ConfigParseError("No --remote or <connection> block found.");
+ }
+
if (np.mConnections.length > 0 && connectionBlocks != null) {
throw new ConfigParseError("Using a <connection> block and --remote is not allowed.");
}