Skip to content

Commit

Permalink
Flush blackhole xroutes faster.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliusz Chroboczek committed Jun 28, 2007
1 parent a413cb6 commit c4e28de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion babel.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,9 @@ expire_routes(void)
i = 0;
while(i < numxroutes) {
struct xroute *xroute = &xroutes[i];
if(xroute->time < now.tv_sec - xroute_gc_delay) {
if(xroute->time < now.tv_sec - xroute_gc_delay ||
(xroute->cost >= INFINITY &&
xroute->time < now.tv_sec - xroute_hold_delay)) {
flush_xroute(xroute);
continue;
}
Expand Down
1 change: 1 addition & 0 deletions xroute.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct xroute myxroutes[MAXMYXROUTES];
int nummyxroutes = 0;

int xroute_gc_delay = 180;
int xroute_hold_delay = 45;

static struct xroute *
find_installed_xroute(unsigned char *prefix, unsigned short plen)
Expand Down
1 change: 1 addition & 0 deletions xroute.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ extern struct xroute myxroutes[MAXMYXROUTES];
extern int nummyxroutes;

extern int xroute_gc_delay;
extern int xroute_hold_delay;

void install_xroute(struct xroute *xroute);
void uninstall_xroute(struct xroute *xroute);
Expand Down

0 comments on commit c4e28de

Please sign in to comment.