summaryrefslogtreecommitdiff
path: root/zebra/zebra_static.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_static.c')
-rw-r--r--zebra/zebra_static.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/zebra_static.c b/zebra/zebra_static.c
index 5927ba9d75..751ea08a38 100644
--- a/zebra/zebra_static.c
+++ b/zebra/zebra_static.c
@@ -331,11 +331,12 @@ void static_uninstall_route(afi_t afi, safi_t safi, struct prefix *p,
}
UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)) {
+ rib_dest_t *dest = rib_dest_from_rnode(rn);
+
/* If there are other active nexthops, do an update. */
if (re->nexthop_active_num > 1) {
/* Update route in kernel if it's in fib */
- if (CHECK_FLAG(re->status,
- ROUTE_ENTRY_SELECTED_FIB))
+ if (dest->selected_fib)
rib_install_kernel(rn, re, re);
/* Update redistribution if it's selected */
if (CHECK_FLAG(re->flags, ZEBRA_FLAG_SELECTED))
@@ -350,8 +351,7 @@ void static_uninstall_route(afi_t afi, safi_t safi, struct prefix *p,
p, (struct prefix *)src_p, re);
/* Remove from kernel if fib route becomes
* inactive */
- if (CHECK_FLAG(re->status,
- ROUTE_ENTRY_SELECTED_FIB))
+ if (dest->selected_fib)
rib_uninstall_kernel(rn, re);
}
}