From 32ab329bc69c6292c205d4f33a4b8069341798d3 Mon Sep 17 00:00:00 2001 From: Gert Doering Date: Sat, 8 Oct 2011 12:26:52 +0200 Subject: [PATCH] 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 --- options.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) 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")) -- 2.47.2