mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 05:10:25 +00:00
fba018f36e
This commit migrates the test for zero-length external routes from a Python script to the Nexus test framework. The original test was test_zero_len_external_route.py in tests/scripts/thread-cert. The new Nexus test test_zero_len_external_route.cpp replicates the original test scenario: - Forms a network with a Leader and two Routers. - Verifies that adding a zero-length external route "::/0" on a Router allows routing to a manually added IPv6 address on that Router. - Verifies that explicit external routes are preferred over on-mesh prefixes that have the default route flag set. - Verifies that removing the external route causes traffic to be re-routed (and in this case, fail as intended when the destination is moved). - Verifies that moving the address to another Router with a default route flag allows successful routing. This commit also fixes a bug in Core::SendAndVerifyEchoRequest in nexus_core.cpp where the ICMP handler was not always unregistered, especially when failures occurred. This fix ensures that subsequent handler registrations in the same process do not fail with kErrorAlready. Migrating to Nexus provides faster execution and better integration with the core OpenThread codebase.