0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 02:01:55 +00:00

RIP partial reload never worked properly, running full reload always

This commit is contained in:
Maria Matejka 2024-05-10 16:32:08 +02:00 committed by Katerina Kubecova
parent b9db1d70fe
commit 2537e7f924
2 changed files with 5 additions and 20 deletions

View File

@ -969,9 +969,6 @@ rip_timer(timer *t)
FIB_ITERATE_INIT(&fit, &p->rtable); FIB_ITERATE_INIT(&fit, &p->rtable);
struct channel_import_request *cir = p->cir;
p->cir = NULL;
loop: loop:
FIB_ITERATE_START(&p->rtable, &fit, struct rip_entry, en) FIB_ITERATE_START(&p->rtable, &fit, struct rip_entry, en)
{ {
@ -993,7 +990,7 @@ rip_timer(timer *t)
} }
/* Propagating eventual change */ /* 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 * We have to restart the iteration because there may be a cascade of
@ -1050,18 +1047,6 @@ 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));
} }
@ -1168,8 +1153,9 @@ rip_reload_routes(struct channel *C, struct channel_import_request *cir)
{ {
struct rip_proto *p = (struct rip_proto *) C->proto; struct rip_proto *p = (struct rip_proto *) C->proto;
cir->next = p->cir; /* Always reload full */
p->cir = cir; if (cir)
CALL(cir->done, cir);
if (p->rt_reload) if (p->rt_reload)
return 1; return 1;

View File

@ -103,7 +103,6 @@ struct rip_proto
struct tbf log_pkt_tbf; /* TBF for packet messages */ struct tbf log_pkt_tbf; /* TBF for packet messages */
struct tbf log_rte_tbf; /* TBF for RTE messages */ struct tbf log_rte_tbf; /* TBF for RTE messages */
struct channel_import_request *cir; /* Trie for partial reload */
}; };
struct rip_iface struct rip_iface