mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 05:18:47 +00:00
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>
This commit is contained in:
parent
ae2992851b
commit
8cb41cd624
@ -1839,22 +1839,12 @@ static void rib_process(struct route_node *rn)
|
|||||||
else if (old_fib)
|
else if (old_fib)
|
||||||
rib_process_del_fib(zvrf, rn, old_fib);
|
rib_process_del_fib(zvrf, rn, old_fib);
|
||||||
|
|
||||||
/* Redistribute SELECTED entry */
|
/* Update SELECTED entry */
|
||||||
if (old_selected != new_selected || selected_changed) {
|
if (old_selected != new_selected || selected_changed) {
|
||||||
struct nexthop *nexthop = NULL;
|
|
||||||
|
|
||||||
/* Check if we have a FIB route for the destination, otherwise,
|
if (new_selected) {
|
||||||
* don't redistribute it */
|
SET_FLAG(new_selected->flags, ZEBRA_FLAG_SELECTED);
|
||||||
if (new_fib) {
|
|
||||||
for (ALL_NEXTHOPS(new_fib->ng, nexthop)) {
|
|
||||||
if (CHECK_FLAG(nexthop->flags,
|
|
||||||
NEXTHOP_FLAG_FIB)) {
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!nexthop)
|
|
||||||
new_selected = NULL;
|
|
||||||
|
|
||||||
if (new_selected && new_selected != new_fib) {
|
if (new_selected && new_selected != new_fib) {
|
||||||
nexthop_active_update(rn, new_selected, 1);
|
nexthop_active_update(rn, new_selected, 1);
|
||||||
@ -1868,14 +1858,6 @@ static void rib_process(struct route_node *rn)
|
|||||||
UNSET_FLAG(old_selected->flags,
|
UNSET_FLAG(old_selected->flags,
|
||||||
ZEBRA_FLAG_SELECTED);
|
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 */
|
/* Remove all RE entries queued for removal */
|
||||||
|
Loading…
Reference in New Issue
Block a user