From d753e9eec96f03aa02a7648e4279c524c376908d Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 22 Jan 2003 19:45:50 +0000 Subject: Matthew Grant Subject: [zebra 17290] [PATCHES] - Fixes for problems in 0.93b Added ifupstaticfix --- zebra/zebra_rib.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'zebra/zebra_rib.c') diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index ec07e2e3..0f7ccebc 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -855,11 +855,13 @@ rib_process (struct route_node *rn, struct rib *del) struct rib *next; struct rib *fib = NULL; struct rib *select = NULL; + int installed = 0; + struct nexthop *nexthop = NULL; for (rib = rn->info; rib; rib = next) { next = rib->next; - + /* Currently installed rib. */ if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_SELECTED)) fib = rib; @@ -898,6 +900,22 @@ rib_process (struct route_node *rn, struct rib *del) rib_install_kernel (rn, select); redistribute_add (&rn->p, select); } + else if (! RIB_SYSTEM_ROUTE (select)) + { + /* Housekeeping code to deal with + race conditions in kernel with linux + netlink reporting interface up before IPv4 or IPv6 protocol + is ready to add routes. + This makes sure the routes are IN the kernel. + */ + + for (nexthop = select->nexthop; nexthop; nexthop = nexthop->next) + { + if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB)) + installed = 1; + } + if (! installed) rib_install_kernel (rn, select); + } return; } -- cgit v1.2.1