ospfd: fix forwarding-address-self for existing external LSAs - #22864
Open
enkechen-panw wants to merge 2 commits into
Open
ospfd: fix forwarding-address-self for existing external LSAs#22864enkechen-panw wants to merge 2 commits into
enkechen-panw wants to merge 2 commits into
Conversation
Member
|
@greptileai review |
Greptile SummaryThis PR corrects forwarding-address refresh behavior for existing external LSAs.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Sequence DiagramsequenceDiagram
participant CLI as forwarding-address-self CLI
participant ASBR as ASBR update scheduler
participant LSA as External LSA refresh
participant LSDB as OSPF LSDB
CLI->>ASBR: Schedule update when value changes
ASBR->>LSA: Refresh Type-5 and Type-7 LSAs
LSA->>LSA: Recompute forwarding address
alt Valid replacement
LSA->>LSDB: Install and flood refreshed LSA
else P-bit set without eligible address
LSA->>LSDB: Flush old Type-7 LSA
end
Reviews (5): Last reviewed commit: "ospfd: fix NSSA LSA refresh to use curre..." | Re-trigger Greptile |
When `forwarding-address-self` is configured after `redistribute`, the external LSAs that were already originated do not reflect the new forwarding address setting. This causes the LSAs to have the actual nexthop as the forwarding address instead of 0.0.0.0. Fix this by scheduling an ASBR redistribution update to refresh all external LSAs whenever the `forwarding-address-self` setting is changed. Fixes: ospf_forwarding_address_self topotest failure Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
enkechen-panw
force-pushed
the
ospf-forwarding-address-self-fix
branch
from
July 30, 2026 07:09
8d2a3f4 to
63913e5
Compare
Contributor
Author
|
@greptileai review |
enkechen-panw
force-pushed
the
ospf-forwarding-address-self-fix
branch
from
July 30, 2026 07:27
63913e5 to
98fdb2d
Compare
Contributor
Author
|
@greptileai review |
enkechen-panw
force-pushed
the
ospf-forwarding-address-self-fix
branch
from
July 30, 2026 07:33
98fdb2d to
15eb3ab
Compare
Contributor
Author
|
@greptileai review |
When `forwarding-address-self` changes, the scheduled ASBR redistribution update triggers ospf_nssa_lsa_refresh() for existing Type-7 LSAs. However, ospf_nssa_lsa_refresh() was preserving the forwarding address from the old LSA, overriding the newly computed value that respects the current `forwarding-address-self` setting. Fix this by applying the same NSSA forwarding address logic used during origination (ospf_nssa_lsa_originate): - Use the newly computed forwarding address from ospf_external_lsa_new() - Only apply the NSSA interface address fallback when the P-bit is set (per RFC 3101, Type-7 LSAs without P-bit may have zero forwarding address) - Discard the LSA if P-bit is set but no NSSA interface address is available Also fix a pre-existing issue where failed refresh would leave the old LSA orphaned in the LSDB (unregistered from refresh but still advertised with stale data). Now flush the old LSA on any refresh failure. Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
enkechen-panw
force-pushed
the
ospf-forwarding-address-self-fix
branch
from
July 30, 2026 07:42
15eb3ab to
dbb4db2
Compare
Contributor
Author
|
@greptileai review |
Contributor
Author
|
ci:rerun |
1 similar comment
Contributor
Author
|
ci:rerun |
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.
Summary
address instead of preserving the stale value
Problem
When forwarding-address-self is configured after redistribute, existing
external LSAs retain their original forwarding address.
Additionally, for NSSA areas, ospf_nssa_lsa_refresh() was explicitly
preserving the old forwarding address from the existing LSA,
preventing the config change from taking effect on Type-7 LSAs.
Solution
changes to refresh all external LSAs
address, applying the same NSSA logic as origination (per RFC 3101)