mirror of
https://github.com/espressif/openthread.git
synced 2026-08-30 22:09:54 +00:00
[nexus] add test for IPv6 default route advertisement (PIC-TC-3) (#12860)
This commit adds a Nexus test case 1_4_PIC_TC_3 to verify the IPv6 default route advertisement behavior of a Border Router (BR) in a Thread 1.4 network. The test verifies that: - The BR correctly advertises a default route (::/0) in Thread Network Data when it discovers a default route on the infrastructure link. - The BR maintains the default route advertisement even if the infrastructure default route is withdrawn, provided a non-ULA prefix remains active on the infrastructure link. - The default route advertisement is correctly restored or updated when the infrastructure default route is re-enabled. The test implementation includes: - test_1_4_PIC_TC_3.cpp: C++ test logic using the Nexus simulation framework, simulating BR, Router, End Device, and Infrastructure nodes (Eth_1, Eth_2). It uses a custom ICMPv6 receive callback to simulate "no route to host" conditions. - verify_1_4_PIC_TC_3.py: Python verification script that analyzes the captured packets to ensure MLE Data Responses and ICMPv6 traffic match the expected behavior for each test step. Integration: - Updated tests/nexus/CMakeLists.txt and tests/nexus/run_nexus_tests.sh to include the new test in the automated test suite.
This commit is contained in:
@@ -657,6 +657,7 @@ _LAYER_FIELDS = {
|
||||
'thread_nwd.tlv.border_router_16': _list(_auto),
|
||||
'thread_nwd.tlv.has_route.br_16': _list(_auto),
|
||||
'thread_nwd.tlv.has_route.pref': _list(_auto),
|
||||
'thread_nwd.tlv.has_route.np': _list(_auto),
|
||||
'thread_nwd.tlv.sub_tlvs': _list(_str),
|
||||
# TODO: support thread_nwd.tlv.prefix.length and thread_nwd.tlv.prefix.domain_id
|
||||
'thread_nwd.tlv.prefix': _list(_ipv6_addr),
|
||||
|
||||
Reference in New Issue
Block a user