From: Mark Stapp Date: Wed, 27 Jun 2018 21:13:26 +0000 (-0400) Subject: zebra: set SELECTED flag in rib_process X-Git-Tag: frr-7.1-dev~233^2~16 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8cb41cd624536f435dacb4096d3d024e729baca1;p=matthieu%2Ffrr.git 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 --- 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 */