summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-08 22:33:02 +0000
committerMartin Mares <mj@ucw.cz>2000-05-08 22:33:02 +0000
commit0521e4f68490d5ef5cc6ba6b2b4e4edf7cf6aa1a (patch)
tree09a86353383c3624850dba85ac78ce339de16c2c /nest
parentc09d1e8df2d5d1ebfb4ce3dfbe93347a83acd99d (diff)
rt_prune: Don't kill routes from protocols in FS_FEEDING state. If debugging,
call fib_check() on the table's fib.
Diffstat (limited to 'nest')
-rw-r--r--nest/rt-table.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index cf87a707..d1594b32 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -538,6 +538,9 @@ rt_prune(rtable *tab)
int rcnt = 0, rdel = 0, ncnt = 0, ndel = 0;
DBG("Pruning route table %s\n", tab->name);
+#ifdef DEBUGGING
+ fib_check(&tab->fib);
+#endif
FIB_ITERATE_INIT(&fit, &tab->fib);
again:
FIB_ITERATE_START(&tab->fib, &fit, f)
@@ -547,7 +550,8 @@ again:
ncnt++;
rescan:
for (e=n->routes; e; e=e->next, rcnt++)
- if (e->attrs->proto->core_state != FS_HAPPY)
+ if (e->attrs->proto->core_state != FS_HAPPY &&
+ e->attrs->proto->core_state != FS_FEEDING)
{
rte_discard(tab, e);
rdel++;
@@ -563,6 +567,9 @@ again:
}
FIB_ITERATE_END(f);
DBG("Pruned %d of %d routes and %d of %d networks\n", rcnt, rdel, ncnt, ndel);
+#ifdef DEBUGGING
+ fib_check(&tab->fib);
+#endif
tab->gc_counter = 0;
tab->gc_time = now;
}