]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixed a buglet in asynchronous feeding and increased maximum number
authorMartin Mares <mj@ucw.cz>
Fri, 19 May 2000 10:59:47 +0000 (10:59 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 19 May 2000 10:59:47 +0000 (10:59 +0000)
of routes allowed per feeding phase.

nest/rt-table.c

index d81dd857de16517354bb02960fe4979ad3028970..2362c2c89bdf744f73fe49e183e3afa26f1e31bf 100644 (file)
@@ -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);