From 6cac71ab47e3b95b36af2d5c872fe4525a3dae89 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 e64a620f0030..0521029e6c8c 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 */