From 27478065df302558bb61335239ecf37394882390 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Tue, 10 Sep 2024 14:06:19 +0200 Subject: [PATCH] TMP: krt hints: --- sysdep/unix/krt.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 7039181c..db527027 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -896,17 +896,27 @@ krt_shutdown(struct proto *P) /* FIXME we should flush routes even when persist during reconfiguration */ if (p->initialized && !KRT_CF->persist && (P->down_code != PDC_CMD_GR_DOWN)) { - p->sync_state = KPS_FLUSHING; - channel_request_full_refeed(p->p.main_channel); + rt_export_feeder req; /* init z P->main_channel->table, na export_best */ + ...; + + RT_FEED_WALK(req, f) /* look at rt-show.c for example */ + { + for (...) + rte *e = &f->block[i]; + /* check bmap_test(P->main_channel->export_rejected_map, e->id) + * if 0, then never exported (can be skipped) + */ + + /* if exported then delete from kernel */ + krt_replace_rte(p, net, NULL, old ?: new); + } + + /* put things from krt_export_fed */ - /* Keeping the protocol UP until the feed-to-flush is done */ - return PS_UP; - } - else - { - krt_cleanup(p); - return PS_DOWN; } + + krt_cleanup(p); + return PS_DOWN; } static void