]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
RIP partial reload never worked properly, running full reload always
authorMaria Matejka <mq@ucw.cz>
Fri, 10 May 2024 14:32:08 +0000 (16:32 +0200)
committerMaria Matejka <mq@ucw.cz>
Sat, 25 May 2024 17:37:16 +0000 (19:37 +0200)
proto/rip/rip.c
proto/rip/rip.h

index bc5bd8b5180b9f5b4ecf1bf1071e180cf735695d..9e36306baa4fd28d33591db0e4c5ee097f536305 100644 (file)
@@ -969,9 +969,6 @@ rip_timer(timer *t)
 
   FIB_ITERATE_INIT(&fit, &p->rtable);
 
-  struct channel_import_request *cir = p->cir;
-  p->cir = NULL;
-
   loop:
   FIB_ITERATE_START(&p->rtable, &fit, struct rip_entry, en)
   {
@@ -993,7 +990,7 @@ rip_timer(timer *t)
     }
 
     /* Propagating eventual change */
-    if ((changed || p->rt_reload) && (cir == NULL || channel_import_request_prefilter(cir, en->n.addr)))
+    if (changed || p->rt_reload)
     {
       /*
        * We have to restart the iteration because there may be a cascade of
@@ -1050,19 +1047,7 @@ rip_timer(timer *t)
       }
   }
 
-  while(cir)
-  {
-    struct channel_import_request *next_cir = cir->next;
-    cir->done(cir);
-    cir = next_cir;
-  }
-  if (p->cir)
-  {
-    p->rt_reload = 1;
-    rip_kick_timer(p);
-  }
-  else
-    tm_start(p->timer, MAX(next - now_, 100 MS));
+  tm_start(p->timer, MAX(next - now_, 100 MS));
 }
 
 static inline void
@@ -1168,8 +1153,9 @@ rip_reload_routes(struct channel *C, struct channel_import_request *cir)
 {
   struct rip_proto *p = (struct rip_proto *) C->proto;
 
-  cir->next = p->cir;
-  p->cir = cir;
+  /* Always reload full */
+  if (cir)
+    CALL(cir->done, cir);
 
   if (p->rt_reload)
     return 1;
index 48594b2313923d6515aa8201ea01f520980054cd..260451d18a23f9a4197c07510545cd8009e2ce97 100644 (file)
@@ -103,7 +103,6 @@ struct rip_proto
 
   struct tbf log_pkt_tbf;              /* TBF for packet messages */
   struct tbf log_rte_tbf;              /* TBF for RTE messages */
-  struct channel_import_request *cir;  /* Trie for partial reload */
 };
 
 struct rip_iface