Commit 2aa105a2 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Make xroute_gc_delay a named constant.

parent 8a8d739c
...@@ -741,7 +741,7 @@ expire_routes(void) ...@@ -741,7 +741,7 @@ expire_routes(void)
i = 0; i = 0;
while(i < numxroutes) { while(i < numxroutes) {
struct xroute *xroute = &xroutes[i]; struct xroute *xroute = &xroutes[i];
if(xroute->time < now.tv_sec - 240) { if(xroute->time < now.tv_sec - xroute_gc_delay) {
flush_xroute(xroute); flush_xroute(xroute);
continue; continue;
} }
......
...@@ -39,6 +39,8 @@ int numxroutes = 0; ...@@ -39,6 +39,8 @@ int numxroutes = 0;
struct xroute myxroutes[MAXMYXROUTES]; struct xroute myxroutes[MAXMYXROUTES];
int nummyxroutes = 0; int nummyxroutes = 0;
int xroute_gc_delay = 180;
static struct xroute * static struct xroute *
find_installed_xroute(unsigned char *prefix, unsigned short plen) find_installed_xroute(unsigned char *prefix, unsigned short plen)
{ {
......
...@@ -38,6 +38,8 @@ extern int numxroutes; ...@@ -38,6 +38,8 @@ extern int numxroutes;
extern struct xroute myxroutes[MAXMYXROUTES]; extern struct xroute myxroutes[MAXMYXROUTES];
extern int nummyxroutes; extern int nummyxroutes;
extern int xroute_gc_delay;
void install_xroute(struct xroute *xroute); void install_xroute(struct xroute *xroute);
void uninstall_xroute(struct xroute *xroute); void uninstall_xroute(struct xroute *xroute);
void consider_xroute(struct xroute *xroute); void consider_xroute(struct xroute *xroute);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment