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 <anlan_cs@126.com>
This commit is contained in:
anlan_cs 2024-12-14 18:30:18 +08:00
parent b9538fe481
commit 298bc623e7

View File

@ -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 */