From 298bc623e78a15ae950bfbac9a103e24ac57e8bd Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Sat, 14 Dec 2024 18:30:18 +0800 Subject: [PATCH] zebra: don't uninstall kernel routes After the nexthop check is fixed, zebra will wrongly uninstall the kernel routes with inactive nexthop. This commit would skip the uninstallation for kernel routes. Signed-off-by: anlan_cs --- zebra/zebra_rib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index e64a620f00..0521029e6c 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1480,7 +1480,7 @@ static void rib_process(struct route_node *rn) rib_process_update_fib(zvrf, rn, old_fib, new_fib); else if (new_fib) rib_process_add_fib(zvrf, rn, new_fib); - else if (old_fib) + else if (old_fib && !RIB_SYSTEM_ROUTE(old_fib)) rib_process_del_fib(zvrf, rn, old_fib); /* Remove all RE entries queued for removal */