[thread-tlvs] add missing packed macros to ThreadRouterMaskTlv (#12769)

This commit updates the `ThreadRouterMaskTlv` class definition to
include the `OT_TOOL_PACKED_BEGIN` and `OT_TOOL_PACKED_END` macros.
This class defines the structure of a TLV used in Thread messages
and directly maps to a memory buffer. Therefore, it must be properly
packed to ensure its memory footprint accurately reflects the wire
format and to prevent potential memory alignment padding.

Thankfully, this omission did not impact the format of this specific
TLV, as the alignment of its members natively matched the packed
layout.
This commit is contained in:
Abtin Keshavarzian
2026-03-26 21:40:28 -05:00
committed by GitHub
parent 12f4b83195
commit 697fb25bed
+2 -1
View File
@@ -139,6 +139,7 @@ typedef UintTlvInfo<ThreadTlv::kStatus, uint8_t> ThreadStatusTlv;
/**
* Implements Router Mask TLV generation and parsing.
*/
OT_TOOL_PACKED_BEGIN
class ThreadRouterMaskTlv : public ThreadTlv, public TlvInfo<ThreadTlv::kRouterMask>
{
public:
@@ -198,7 +199,7 @@ public:
private:
uint8_t mIdSequence;
Mle::RouterIdSet mAssignedRouterIdMask;
};
} OT_TOOL_PACKED_END;
/**
* Implements Thread Network Data TLV generation and parsing.