summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2018-06-27 17:13:26 -0400
committerMark Stapp <mjs@voltanet.io>2018-10-25 08:34:30 -0400
commit8cb41cd624536f435dacb4096d3d024e729baca1 (patch)
tree368cb7979dcd65c48ad4dcfe29ac2497833bc1cc /zebra/zebra_rib.c
parentae2992851bcf4bf832d282bb1e8945de0da1974a (diff)
zebra: set SELECTED flag in rib_process
Set SELECTED re immediately in rib_process, without expecting that fib install has completed. Remove premature redistribute call also. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 784b92786a..bd13248f56 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1839,22 +1839,12 @@ static void rib_process(struct route_node *rn)
else if (old_fib)
rib_process_del_fib(zvrf, rn, old_fib);
- /* Redistribute SELECTED entry */
+ /* Update SELECTED entry */
if (old_selected != new_selected || selected_changed) {
- struct nexthop *nexthop = NULL;
- /* Check if we have a FIB route for the destination, otherwise,
- * don't redistribute it */
- if (new_fib) {
- for (ALL_NEXTHOPS(new_fib->ng, nexthop)) {
- if (CHECK_FLAG(nexthop->flags,
- NEXTHOP_FLAG_FIB)) {
- break;
- }
- }
+ if (new_selected) {
+ SET_FLAG(new_selected->flags, ZEBRA_FLAG_SELECTED);
}
- if (!nexthop)
- new_selected = NULL;
if (new_selected && new_selected != new_fib) {
nexthop_active_update(rn, new_selected, 1);
@@ -1868,14 +1858,6 @@ static void rib_process(struct route_node *rn)
UNSET_FLAG(old_selected->flags,
ZEBRA_FLAG_SELECTED);
}
-
- if (new_selected) {
- /* Install new or replace existing redistributed entry
- */
- SET_FLAG(new_selected->flags, ZEBRA_FLAG_SELECTED);
- redistribute_update(p, src_p, new_selected,
- old_selected);
- }
}
/* Remove all RE entries queued for removal */