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>
... | ... |
@@ -4950,25 +4950,6 @@ add_option (struct options *options, |
4950 | 4950 |
} |
4951 | 4951 |
options->max_routes = max_routes; |
4952 | 4952 |
} |
4953 |
- else if (streq (p[0], "stale-routes-check") && p[1]) |
|
4954 |
- { |
|
4955 |
- int ageing_time, check_interval; |
|
4956 |
- |
|
4957 |
- VERIFY_PERMISSION (OPT_P_GENERAL); |
|
4958 |
- ageing_time = atoi (p[1]); |
|
4959 |
- if (p[2]) |
|
4960 |
- check_interval = atoi (p[2]); |
|
4961 |
- else |
|
4962 |
- check_interval = ageing_time; |
|
4963 |
- |
|
4964 |
- if (ageing_time < 1 || check_interval < 1) |
|
4965 |
- { |
|
4966 |
- msg (msglevel, "--stale-routes-check aging time and check interval must be >= 1"); |
|
4967 |
- goto err; |
|
4968 |
- } |
|
4969 |
- options->stale_routes_ageing_time = ageing_time; |
|
4970 |
- options->stale_routes_check_interval = check_interval; |
|
4971 |
- } |
|
4972 | 4953 |
else if (streq (p[0], "route-gateway") && p[1]) |
4973 | 4954 |
{ |
4974 | 4955 |
VERIFY_PERMISSION (OPT_P_ROUTE_EXTRAS); |
... | ... |
@@ -5598,6 +5579,25 @@ add_option (struct options *options, |
5598 | 5598 |
VERIFY_PERMISSION (OPT_P_GENERAL); |
5599 | 5599 |
options->server_flags |= SF_TCP_NODELAY_HELPER; |
5600 | 5600 |
} |
5601 |
+ else if (streq (p[0], "stale-routes-check") && p[1]) |
|
5602 |
+ { |
|
5603 |
+ int ageing_time, check_interval; |
|
5604 |
+ |
|
5605 |
+ VERIFY_PERMISSION (OPT_P_GENERAL); |
|
5606 |
+ ageing_time = atoi (p[1]); |
|
5607 |
+ if (p[2]) |
|
5608 |
+ check_interval = atoi (p[2]); |
|
5609 |
+ else |
|
5610 |
+ check_interval = ageing_time; |
|
5611 |
+ |
|
5612 |
+ if (ageing_time < 1 || check_interval < 1) |
|
5613 |
+ { |
|
5614 |
+ msg (msglevel, "--stale-routes-check aging time and check interval must be >= 1"); |
|
5615 |
+ goto err; |
|
5616 |
+ } |
|
5617 |
+ options->stale_routes_ageing_time = ageing_time; |
|
5618 |
+ options->stale_routes_check_interval = check_interval; |
|
5619 |
+ } |
|
5601 | 5620 |
#endif /* P2MP_SERVER */ |
5602 | 5621 |
|
5603 | 5622 |
else if (streq (p[0], "client")) |