From: Gert Doering Date: Sat, 8 Oct 2011 10:26:52 +0000 (+0200) Subject: Move block for "stale-routes-check" config inside #ifdef P2MP_SERVER block X-Git-Tag: v2.3-alpha1~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32ab329bc69c6292c205d4f33a4b8069341798d3;p=thirdparty%2Fopenvpn.git 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 Acked-by: Davide Guerri Signed-off-by: David Sommerseth --- diff --git a/options.c b/options.c index 68255a5a1..c1a0ba60b 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"))