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

index ea6739da0391e962ecabbc5e81ff4db2632a65fe..77ff3f5f207cddd32267eee0cfba4f75b2f2140a 100644 (file)
@@ -436,8 +436,9 @@ static int
 ospf_reload_routes(struct channel *C, struct channel_import_request *cir)
 {
   struct ospf_proto *p = (struct ospf_proto *) C->proto;
-  cir->next = p->cir;
-  p->cir = cir;
+
+  if (cir)
+    CALL(cir->done, cir);
 
   if (p->calcrt == 2)
     return 1;
index 9314b4d36e553b25dbf8320a3033cd5fbc5cad90..91204667e060c584f9df3f52fa0aa74b70f20d92 100644 (file)
@@ -219,7 +219,6 @@ struct ospf_proto
   slist lsal;                  /* List of all LSA's */
   int calcrt;                  /* Routing table calculation scheduled?
                                   0=no, 1=normal, 2=forced reload */
-  struct channel_import_request *cir; /* Struct with trie for partial reload */
   list iface_list;             /* List of OSPF interfaces (struct ospf_iface) */
   list area_list;              /* List of OSPF areas (struct ospf_area) */
   int areano;                  /* Number of area I belong to */
index 27564cfec137f59ea1d4a0378e58360ebb9335c7..40c30b81519a09d9fbb666a8308cff98e51a7638 100644 (file)
@@ -1696,8 +1696,7 @@ ospf_rt_spf(struct ospf_proto *p)
   rt_sync(p);
   lp_flush(p->nhpool);
 
-  if (p->cir == NULL)  /* If there is no more cir waiting for reload */
-    p->calcrt = 0;
+  p->calcrt = 0;
 }
 
 
@@ -2017,16 +2016,11 @@ rt_sync(struct ospf_proto *p)
 
   OSPF_TRACE(D_EVENTS, "Starting routing table synchronization");
 
-  struct channel_import_request *cir = p->cir;
-  p->cir = NULL;
-
   DBG("Now syncing my rt table with nest's\n");
   FIB_ITERATE_INIT(&fit, fib);
 again1:
   FIB_ITERATE_START(fib, &fit, ort, nf)
   {
-    if (cir && !channel_import_request_prefilter(cir, nf->fn.addr))
-      continue;
     /* Sanity check of next-hop addresses, failure should not happen */
     if (nf->n.type && nf->n.nhs)
     {
@@ -2126,13 +2120,6 @@ again1:
   }
   FIB_ITERATE_END;
 
-  while(cir)
-  {
-    struct channel_import_request *next = cir->next;
-    cir->done(cir);
-    cir = next;
-  }
-
   WALK_LIST(oa, p->area_list)
   {
     /* Cleanup ASBR hash tables */