summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorMartin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>2024-04-22 17:13:23 +0200
committerMartin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>2024-05-03 09:49:24 +0200
commitb9255709819e68411fa8dc8456ceae8321231b49 (patch)
treec8effbdd27f30bbe2b4b7e640fcc7456aaa5da97 /ospf6d
parentMerge pull request #15837 from acooks-at-bda/dev/fix-deprecated-cares-api (diff)
downloadfrr-b9255709819e68411fa8dc8456ceae8321231b49.tar.xz
frr-b9255709819e68411fa8dc8456ceae8321231b49.zip
ospf6d: Fix nexthop computation for inter-area multi-ABR ECMP
Pre-b74e965, we always merged nexthops of old (existing) and new (newly generated, based on a LSA update) routes, making it impossible to remove individual nexthops from a route. b74e965 replaced this by copying nexthops from the new route to the old route. This works as long as the old and new route are derived from the same LSA (e.g. multiple ECMP paths to the same ABR). However, in case of multiple parallel ABRs, each of them originates a LSA and the nexthops derived from them need to be combined to get the proper route nexthops. So instead of trying to incrementally update the route nexthops based on the old and new route nexthops, always recompute the route nexthops by merging all of its path nexthops (which we're already updating based on the LSA being processed). Fixes #15777. Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_abr.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index f4202a4a2..d3ff759d3 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -1275,8 +1275,6 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
continue;
}
- list_delete_all_node(old_route->nh_list);
- ospf6_route_copy_nexthops(old_route, route);
old_entry_updated = true;
for (ALL_LIST_ELEMENTS_RO(old_route->paths, anode,
@@ -1330,6 +1328,15 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
}
}
+ /* We added a path or updated a path's nexthops above,
+ * recompute (old) route nexthops by merging all path nexthops
+ */
+ list_delete_all_node(old_route->nh_list);
+ for (ALL_LIST_ELEMENTS_RO(old_route->paths, anode, o_path)) {
+ ospf6_merge_nexthops(old_route->nh_list,
+ o_path->nh_list);
+ }
+
if (is_debug)
zlog_debug(
"%s: Update route: %s %p old cost %u new cost %u nh %u",