0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-08 12:18:42 +00:00

OSPF partial reload never worked properly, running full reload always

This commit is contained in:
Maria Matejka 2024-05-10 16:14:54 +02:00
parent cd9d799abd
commit 43d48ff9fe
3 changed files with 4 additions and 17 deletions

View File

@ -436,8 +436,9 @@ static int
ospf_reload_routes(struct channel *C, struct channel_import_request *cir) ospf_reload_routes(struct channel *C, struct channel_import_request *cir)
{ {
struct ospf_proto *p = (struct ospf_proto *) C->proto; 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) if (p->calcrt == 2)
return 1; return 1;

View File

@ -219,7 +219,6 @@ struct ospf_proto
slist lsal; /* List of all LSA's */ slist lsal; /* List of all LSA's */
int calcrt; /* Routing table calculation scheduled? int calcrt; /* Routing table calculation scheduled?
0=no, 1=normal, 2=forced reload */ 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 iface_list; /* List of OSPF interfaces (struct ospf_iface) */
list area_list; /* List of OSPF areas (struct ospf_area) */ list area_list; /* List of OSPF areas (struct ospf_area) */
int areano; /* Number of area I belong to */ int areano; /* Number of area I belong to */

View File

@ -1696,7 +1696,6 @@ ospf_rt_spf(struct ospf_proto *p)
rt_sync(p); rt_sync(p);
lp_flush(p->nhpool); lp_flush(p->nhpool);
if (p->cir == NULL) /* If there is no more cir waiting for reload */
p->calcrt = 0; p->calcrt = 0;
} }
@ -2022,16 +2021,11 @@ rt_sync(struct ospf_proto *p)
OSPF_TRACE(D_EVENTS, "Starting routing table synchronization"); 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"); DBG("Now syncing my rt table with nest's\n");
FIB_ITERATE_INIT(&fit, fib); FIB_ITERATE_INIT(&fit, fib);
again1: again1:
FIB_ITERATE_START(fib, &fit, ort, nf) 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 */ /* Sanity check of next-hop addresses, failure should not happen */
if (nf->n.type && nf->n.nhs) if (nf->n.type && nf->n.nhs)
{ {
@ -2131,13 +2125,6 @@ again1:
} }
FIB_ITERATE_END; FIB_ITERATE_END;
while(cir)
{
struct channel_import_request *next = cir->next;
cir->done(cir);
cir = next;
}
WALK_LIST(oa, p->area_list) WALK_LIST(oa, p->area_list)
{ {
/* Cleanup ASBR hash tables */ /* Cleanup ASBR hash tables */