mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
eca4f1bef1
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.