summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2019-10-28 14:55:17 +0100
committerArne Schwabe <arne@rfc2549.org>2019-10-28 14:55:17 +0100
commitf860e38141f4b5aa3b1c9642c52c5d98a99d5391 (patch)
treece5d9b4f515c6a4c28980243b96bca2646597039
parent718b2233054c6bd7b88e5ddb9303696ee7e5646e (diff)
Ignore mtu parameter to mssfix (closes #1043)
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java6
1 files changed, 5 insertions, 1 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 93953e49..88336581 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -457,7 +457,7 @@ public class ConfigParser {
throw new ConfigParseError("Sorry. Only tun mode is supported. See the FAQ for more detail");
}
- Vector<String> mssfix = getOption("mssfix", 0, 1);
+ Vector<String> mssfix = getOption("mssfix", 0, 2);
if (mssfix != null) {
if (mssfix.size() >= 2) {
@@ -469,6 +469,10 @@ public class ConfigParser {
} else {
np.mMssFix = 1450; // OpenVPN default size
}
+ // Ignore mtu argument of OpenVPN3 and report error otherwise
+ if (mssfix.size() >= 3 && !(mssfix.get(2).equals("mtu"))) {
+ throw new ConfigParseError("Second argument to --mssfix unkonwn");
+ }
}