summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index c200e2dbb3..b7b4a159da 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -2098,6 +2098,9 @@ void rib_unlink(struct route_node *rn, struct route_entry *re)
dest->routes = re->next;
}
+ if (dest->selected_fib == re)
+ dest->selected_fib = NULL;
+
/* free RE and nexthops */
zebra_deregister_rnh_static_nexthops(re->vrf_id, re->nexthop, rn);
nexthops_free(re->nexthop);