summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/openvpn/options.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 9baa4ff..5cec344 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -5141,6 +5141,11 @@ add_option (struct options *options,
msg (msglevel, "--max-routes parameter is out of range");
goto err;
}
+ if (options->routes || options->routes_ipv6)
+ {
+ msg (msglevel, "--max-routes must to be specifed before any route/route-ipv6/redirect-gateway option");
+ goto err;
+ }
options->max_routes = max_routes;
}
else if (streq (p[0], "route-gateway") && p[1])