summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorGert Doering <gert@greenie.muc.de>2011-10-08 12:26:52 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2011-10-09 13:33:17 +0200
commit32ab329bc69c6292c205d4f33a4b8069341798d3 (patch)
tree0f02b85a27b6152307ea24c637f2de3ac30732d1 /options.c
parent3a957aaef3ae512b217dd475a846a0ea35aae49c (diff)
downloadopenvpn-32ab329bc69c6292c205d4f33a4b8069341798d3.tar.gz
openvpn-32ab329bc69c6292c205d4f33a4b8069341798d3.tar.xz
openvpn-32ab329bc69c6292c205d4f33a4b8069341798d3.zip
Move block for "stale-routes-check" config inside #ifdef P2MP_SERVER block
options->stale_routes_ageing_time etc. are not defined otherwise, and compilation fails. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Davide Guerri <d.guerri@caspur.it> Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'options.c')
-rw-r--r--options.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/options.c b/options.c
index 68255a5..c1a0ba6 100644
--- a/options.c
+++ b/options.c
@@ -4950,25 +4950,6 @@ add_option (struct options *options,
}
options->max_routes = max_routes;
}
- else if (streq (p[0], "stale-routes-check") && p[1])
- {
- int ageing_time, check_interval;
-
- VERIFY_PERMISSION (OPT_P_GENERAL);
- ageing_time = atoi (p[1]);
- if (p[2])
- check_interval = atoi (p[2]);
- else
- check_interval = ageing_time;
-
- if (ageing_time < 1 || check_interval < 1)
- {
- msg (msglevel, "--stale-routes-check aging time and check interval must be >= 1");
- goto err;
- }
- options->stale_routes_ageing_time = ageing_time;
- options->stale_routes_check_interval = check_interval;
- }
else if (streq (p[0], "route-gateway") && p[1])
{
VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS);
@@ -5598,6 +5579,25 @@ add_option (struct options *options,
VERIFY_PERMISSION (OPT_P_GENERAL);
options->server_flags |= SF_TCP_NODELAY_HELPER;
}
+ else if (streq (p[0], "stale-routes-check") && p[1])
+ {
+ int ageing_time, check_interval;
+
+ VERIFY_PERMISSION (OPT_P_GENERAL);
+ ageing_time = atoi (p[1]);
+ if (p[2])
+ check_interval = atoi (p[2]);
+ else
+ check_interval = ageing_time;
+
+ if (ageing_time < 1 || check_interval < 1)
+ {
+ msg (msglevel, "--stale-routes-check aging time and check interval must be >= 1");
+ goto err;
+ }
+ options->stale_routes_ageing_time = ageing_time;
+ options->stale_routes_check_interval = check_interval;
+ }
#endif /* P2MP_SERVER */
else if (streq (p[0], "client"))