From 47b793064c25c8adcab48cacc018be1675f2448a Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 17 Oct 1998 11:05:18 +0000 Subject: Solve chicken-and-egg problems with protocol startup. We now queue all inactive protocols and don't send route/interface updates to them and when they come up, we resend the whole route/interface tables privately. Removed the "scan interface list after protocol start" work-around. --- nest/rt-table.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'nest/rt-table.c') diff --git a/nest/rt-table.c b/nest/rt-table.c index 1d0c29c..dc72c6b 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -116,6 +116,28 @@ rte_announce(net *net, rte *new, rte *old) p->rt_notify(p, net, new, old); } +void +rt_feed_baby(struct proto *p) +{ + rtable *t = &master_table; + + if (!p->rt_notify) + return; + debug("Announcing routes to new protocol %s\n", p->name); + while (t) + { + FIB_WALK(&t->fib, fn) + { + net *n = (net *) fn; + rte *e; + for(e=n->routes; e; e=e->next) + p->rt_notify(p, n, e, NULL); + } + FIB_WALK_END; + t = t->sibling; + } +} + static inline void rte_free(rte *e) { -- cgit v1.2.3