ospf6d: clear local ifp per ECMP path rebuild - #21037
Merged
donaldsharp merged 1 commit intoMar 7, 2026
Merged
Conversation
During intra-prefix ECMP recomputation, ifp was reused across\nold_route->paths iterations. That can carry a previously matched\ndirect-connected interface into an unrelated path and install an\non-link nexthop incorrectly.\n\nReset ifp at each path iteration before evaluating the current\norigin/path context. Signed-off-by: Andreas Florath <Andreas.Florath@telekom.de>
Greptile SummaryThis PR fixes a stale Key changes:
Confidence Score: 5/5
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["ospf6_intra_prefix_route_ecmp_path()"] --> B["Iterate old_route->paths"]
B --> C["ifp = NULL (NEW FIX)"]
C --> D["Lookup ls_entry in spf_table"]
D --> E{ls_entry found?}
E -- No --> F["continue to next path"]
E -- Yes --> G["Lookup lsa in lsdb"]
G --> H{lsa found?}
H -- No --> F
H -- Yes --> I["intra_prefix_lsa = lsa_after_header"]
I --> J{Self-originated LSA?}
J -- Yes --> K["ifp = if_lookup_prefix()"]
J -- No --> L["ifp stays NULL"]
K --> M{ifp != NULL?}
L --> M
M -- Yes --> N["ospf6_route_add_nexthop<br/>direct-connect via ifp"]
M -- No --> O["ospf6_route_merge_nexthops<br/>copy from ls_entry"]
N --> B
O --> B
B --> P["Update RIB/FIB"]
Last reviewed commit: 8d4b765 |
Member
|
@Mergifyio backport stable/10.6 |
β Backports have been createdDetails
|
Jafaral
added a commit
that referenced
this pull request
Mar 8, 2026
ospf6d: clear local ifp per ECMP path rebuild (backport #21037)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ospf6_intra_prefix_route_ecmp_path()can reuse a staleifpvalue while rebuilding the effective nexthop set for an existing intra-prefix route.What changes
ifptoNULLat the start of eachold_route->pathsiterationWhy
The current loop only assigns
ifpfor self-originated Intra-Prefix-LSAs. Without an explicit reset, a previous successful interface lookup can leak into a later unrelated path and cause FRR to install a wrong on-link nexthop.Impact
Fixes #21036