summaryrefslogtreecommitdiffstats
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-05-19 12:59:47 +0200
committerMartin Mares <mj@ucw.cz>2000-05-19 12:59:47 +0200
commit76dfda9e74580b6c07206b7afbbdafeea36ad08f (patch)
treee49d794745286ba1ee0eb314213280276d4fc14b /nest/rt-table.c
parentac5d801217b4b85a5f716ace25f7f9ac48dfee0f (diff)
downloadbird-76dfda9e74580b6c07206b7afbbdafeea36ad08f.tar
bird-76dfda9e74580b6c07206b7afbbdafeea36ad08f.zip
Fixed a buglet in asynchronous feeding and increased maximum number
of routes allowed per feeding phase.
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index d81dd85..2362c2c 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -659,7 +659,7 @@ rt_feed_baby(struct proto *p)
{
struct announce_hook *h;
struct fib_iterator *fit;
- int max_feed = 2; /* FIXME */
+ int max_feed = 256;
if (!p->feed_ahook) /* Need to initialize first */
{
@@ -678,6 +678,11 @@ again:
{
net *n = (net *) fn;
rte *e;
+ if (max_feed <= 0)
+ {
+ FIB_ITERATE_PUT(fit, fn);
+ return 0;
+ }
for(e=n->routes; e; e=e->next)
{
struct proto *q = e->attrs->proto;
@@ -689,11 +694,7 @@ again:
tmpa = q->make_tmp_attrs ? q->make_tmp_attrs(e, rte_update_pool) : NULL;
do_rte_announce(h, n, e, NULL, tmpa, ipa_classify(n->n.prefix));
rte_update_unlock();
- if (!--max_feed)
- {
- FIB_ITERATE_PUT(fit, fn);
- return 0;
- }
+ max_feed--;
}
}
FIB_ITERATE_END(fn);