diff options
author | Gert Doering <gert@greenie.muc.de> | 2011-10-08 12:26:52 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2011-10-09 13:33:17 +0200 |
commit | 32ab329bc69c6292c205d4f33a4b8069341798d3 (patch) | |
tree | 0f02b85a27b6152307ea24c637f2de3ac30732d1 /options.c | |
parent | 3a957aaef3ae512b217dd475a846a0ea35aae49c (diff) | |
download | openvpn-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.c | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -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")) |