summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index aac0e628f..4e08c327c 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -921,11 +921,22 @@ static void rib_process_update_fib(struct zebra_vrf *zvrf,
zebra_route_string(new->type));
}
- /* If labeled-unicast route, uninstall transit LSP. */
- if (zebra_rib_labeled_unicast(old))
- zebra_mpls_lsp_uninstall(zvrf, rn, old);
+ /*
+ * When we have gotten to this point
+ * the new route entry has no nexthops
+ * that are usable and as such we need
+ * to remove the old route, but only
+ * if we were the one who installed
+ * the old route
+ */
+ if (!RIB_SYSTEM_ROUTE(old)) {
+ /* If labeled-unicast route, uninstall transit
+ * LSP. */
+ if (zebra_rib_labeled_unicast(old))
+ zebra_mpls_lsp_uninstall(zvrf, rn, old);
- rib_uninstall_kernel(rn, old);
+ rib_uninstall_kernel(rn, old);
+ }
}
} else {
/*