Files
openthread/tests/scripts
Jonathan Hui eca4f1bef1 [tests] improve CoAP TLV disambiguation in packet verification (#12514)
This commit implements a more robust mechanism to differentiate between
overlapping TLV types in CoAP payloads, specifically for TLV type 8,
which is used for both NM_STEERING_DATA_TLV (MeshCoP) and
DG_IPV6_ADDRESS_LIST_TLV (Diagnostic).

The logic previously relied solely on TLV length, which was fragile
and caused 16-byte Steering Data TLVs to be misinterpreted.

Key changes:
- Enhanced CoapTlvParser.parse() and CoapLayer to accept and pass the
  CoapLayer instance as context during parsing.
- Added a 'uri_path' property to CoapLayer for easier access to the
  CoAP URI path (recon).
- Updated thread_coap_tlv_parse in verify_utils.py to use the URI path
  to correctly identify Diagnostic TLVs (if URI starts with '/d/') vs.
  MeshCoP or other Thread TLVs.
- Updated verify_9_2_1.py monkey-patches to match the new parser
  signature.
2026-02-20 23:54:18 -06:00
..