Repository navigation
ospf6d: restore Router-LSA capabilities and ASBR state on NSSA removal - #23647
dingqipeng wants to merge 1 commit into
Conversation
Reoriginate the Router-LSA when NSSA capabilities change in either direction. Preserve the translator's prior state long enough to balance its ASBR contribution on exit, without clearing other NSSAs or real redistribution. Balance NSSA exit accounting for disabled areas as well. Add native topology regressions for repeated summary-policy cycles, multiple NSSAs, retained static redistribution and unused area removal. Fixes FRRouting#23636 Signed-off-by: dingqipeng <dingqipeng@hotmail.com>
|
| wait_state(set(), True) | ||
| area_config(1, True) | ||
| wait_state({"0.0.0.1"}, True) | ||
| area_config(1, False) | ||
| wait_state(set(), True) |
There was a problem hiding this comment.
The static redistribution case checks EXTERNAL only after NSSA removal. It can pass even if the route was missing while NSSA was enabled and appeared only after removal. Move external_present above the transitions and wait for the installed route before entry, while NSSA is enabled, and after removal.
Knowledge Base Used: Routing integration testing
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/topotests/ospf6_nssa_remove/test_ospf6_nssa_remove.py
Line: 179-183
Comment:
**Route loss can go unnoticed**
The static redistribution case checks `EXTERNAL` only after NSSA removal. It can pass even if the route was missing while NSSA was enabled and appeared only after removal. Move `external_present` above the transitions and wait for the installed route before entry, while NSSA is enabled, and after removal.
**Knowledge Base Used:** [Routing integration testing](https://app.greptile.com/frrouting/-/custom-context/knowledge-base/frrouting/frr/-/docs/routing-integration-testing.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Fixes #23636
After removing the last NSSA, an internal router can keep advertising
NSSA Router-LSA Options, while the former NSSA ABR keeps advertising ASBR
status despite having no configured redistribution. A cost change updates
the Options but does not repair the stale ASBR flag.
Schedule Router-LSA origination on both NSSA entry and exit. On exit,
remember the translator state before clearing it and release only that
translator's existing contribution to
redist_count. Other NSSAs and realredistribution continue to hold ASBR status. Balance the NSSA count on exit
even when the area is administratively disabled, matching unconditional
entry accounting.
The new four-router
ospf6_nssa_removetopotest covers repeated cycleswith both summary policies, removal of one of two NSSAs, retained static
redistribution and clean removal of an unused NSSA. It checks Router-LSA
Options and ASBR flags, Full neighbors, unchanged daemon PIDs, restored
configuration, installed external routes and actual forwarding recovery.
Validation on x86-64 source-built baseline
c4e94c4aaa4f4562313b4a168f91211afc3bcba2and patched images:Options/ASBR observations and passes the complete matrix on patched.
Neither final run has an error or skip; owned containers are removed.
on baseline. After >=110 seconds of native recovery observation and a
cost reorigination control, the ASBR flag remains stale. Patched normal
and no-summary conditions restore the original configuration, database,
Full neighbors, control routes and reachability without that workaround.
Process continuity and cleanup pass in all three trials.
the separate ASBR E flag against native CLI observations. All 1,808 OSPFv3
packets and 187 LSA checksums in six captures pass independent checks.
malformed-packet indication. Black and
git diff --checkpass.Raw logs retain two earlier topotest
assertion/CLI mistakes, their corrections and framework teardown warnings;
neither earlier failure is reported as a new FRR bug.
Independent standalone program,
exact build/test scripts and raw evidence.
The program takes
--image,--outputand optional--case 4/--case 5,honors
DOCKER_HOST, and requires Linux root, Python 3, Docker, iproute2,tcpdump and ping. It needs no private TestSuite or Python module. The local
build cache is not publicly pullable; a normally built FRR image can be used.
No separate architecture, administrative-shutdown or multi-ABR translator
election regression is claimed. Private counters are source-reviewed;
operational consequences are verified through native LSAs and routes.