mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 06:50:17 +00:00
zebra: Double check is not necessary in nexthop_active_update
The nexthop_active_update command looks at each individual nexthop and decides if it has changed. If any nexthop has changed we will set the re->status to ROUTE_ENTRY_CHANGED and ROUTE_ENTRY_NEXTHOPS_CHANGED. Additionally the test for old_nh_num != curr_active makes no sense because suppose we have several events we are processing at the same time and a total ecmp of 16 but 14 are active at the start and 14 are active at the end but different interfaces are up or down. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
dd50eeb115
commit
80ad04184f
@ -940,11 +940,9 @@ static int nexthop_active_update(struct route_node *rn, struct route_entry *re)
|
||||
{
|
||||
struct nexthop *nexthop;
|
||||
union g_addr prev_src;
|
||||
unsigned int prev_active, new_active, old_num_nh;
|
||||
unsigned int prev_active, new_active;
|
||||
ifindex_t prev_index;
|
||||
|
||||
old_num_nh = re->nexthop_active_num;
|
||||
|
||||
re->nexthop_active_num = 0;
|
||||
UNSET_FLAG(re->status, ROUTE_ENTRY_CHANGED);
|
||||
|
||||
@ -982,13 +980,6 @@ static int nexthop_active_update(struct route_node *rn, struct route_entry *re)
|
||||
}
|
||||
}
|
||||
|
||||
if (old_num_nh != re->nexthop_active_num)
|
||||
SET_FLAG(re->status, ROUTE_ENTRY_CHANGED);
|
||||
|
||||
if (CHECK_FLAG(re->status, ROUTE_ENTRY_CHANGED)) {
|
||||
SET_FLAG(re->status, ROUTE_ENTRY_NEXTHOPS_CHANGED);
|
||||
}
|
||||
|
||||
return re->nexthop_active_num;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user