From 1d1338c4f56f998ef7136da0b61a838759944fcc Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Fri, 10 May 2024 16:32:08 +0200 Subject: [PATCH] RIP partial reload never worked properly, running full reload always --- proto/rip/rip.c | 24 +++++------------------- proto/rip/rip.h | 1 - 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/proto/rip/rip.c b/proto/rip/rip.c index bc5bd8b5..9e36306b 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -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; diff --git a/proto/rip/rip.h b/proto/rip/rip.h index 48594b23..260451d1 100644 --- a/proto/rip/rip.h +++ b/proto/rip/rip.h @@ -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