[nexus] add 1_4_TREL_TC_2 for TREL multi-hop routing (#12804)

This commit adds Nexus test case 1_4_TREL_TC_2, which verifies 6LoWPAN
mesh header forwarding and fragmentation over multi-hop paths involving
both 15.4 and TREL radio links, according to the Thread 1.4 spec.

The implementation includes:
- tests/nexus/test_1_4_TREL_TC_2.cpp: Sets up a complex topology with
  a multi-radio Border Router (DUT), a multi-radio Leader, and several
  Routers and End Devices with varying radio capabilities (15.4-only
  or multi-radio). It triggers pings with large payloads (500B) to
  verify fragmentation and multi-hop routing through the DUT.
- tests/nexus/verify_1_4_TREL_TC_2.py: Verifies that packets follow the
  expected multi-hop path, checking that TREL is used for infrastructure
  segments (UDP) and 15.4 is used for Thread-only segments. It also
  ensures that 6LoWPAN fragmentation and mesh headers are correctly
  handled by the DUT when forwarding between different radio types.
- Updated tests/nexus/CMakeLists.txt and tests/nexus/run_nexus_tests.sh
  to include the new test.

This test ensures that the Thread stack correctly handles multi-hop
routing and MTU differences across heterogeneous radio links.
This commit is contained in:
Jonathan Hui
2026-03-31 12:30:43 -05:00
committed by GitHub
parent 63ec21ea77
commit d0949e1e92
8 changed files with 796 additions and 7 deletions
@@ -324,7 +324,7 @@ REAL_LAYER_NAMES = {
'dns',
'igmp',
'mdns',
'dns',
'trel',
}
FAKE_LAYER_NAMES = {'thread_nwd', 'thread_meshcop', 'ipv6inner'}
@@ -714,6 +714,12 @@ _LAYER_FIELDS = {
'mdns.srv.port': _list(_auto),
'mdns.srv.target': _list(_str),
'mdns.ptr.domain_name': _list(_str),
# TREL
'trel.source_addr': _ext_addr,
'trel.destination_addr': _ext_addr,
'trel.wpan.src16': _hex,
'trel.wpan.dst16': _hex,
}
_layer_containers = set()