Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[joiner-router] enhance & fix appending TLVs to Joiner Entrust msg (#…
…9614) This commit updates `JoinerRouter::PrepareJoinerEntrustMessage()` to improve how TLVs from Active Operational Dataset are appended to the message. The TLV types that should be included in Joiner Entrust are now defined in an array `kTlvTypes`, and the code iterating over this array will find the TLV in Dataset and append it to the message. Previously, if a required TLV type was not present in the Dataset, the code would have appended the TLV with an uninitialized and possibly random value, which could lead to unexpected behavior. The new code will fail if the required TLVs are not present in the Dataset instead, ensuring that only valid TLVs are included in the Joiner Entrust message.
- Loading branch information