]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: don't uninstall kernel routes
authoranlan_cs <anlan_cs@126.com>
Sat, 14 Dec 2024 10:30:18 +0000 (18:30 +0800)
committeranlan_cs <anlan_cs@126.com>
Tue, 17 Dec 2024 08:14:30 +0000 (16:14 +0800)
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>
zebra/zebra_rib.c

index e64a620f0030b1ef041f3047c6585690feb9eac4..0521029e6c8c8eda66d028bff00cfb584d963a03 100644 (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 */