mirror of
https://github.com/espressif/openthread.git
synced 2026-07-28 14:47:46 +00:00
[mle] always echo back AR TLV in Child ID/Update Response (#4162)
This commit ensures that a Child ID/Update Response message always
includes an Address Registration TLV when the Child ID/Update Request
message includes an Address Registration TLV, even when there are no
IPv6 addresses to include.
This commit reverts a change in commit 1133983.
This commit is contained in:
@@ -4355,16 +4355,8 @@ otError MleRouter::AppendChildAddresses(Message &aMessage, Child &aChild)
|
||||
length += entry.GetLength();
|
||||
}
|
||||
|
||||
if (length > 0)
|
||||
{
|
||||
tlv.SetLength(length);
|
||||
aMessage.Write(startOffset, sizeof(tlv), &tlv);
|
||||
}
|
||||
else
|
||||
{
|
||||
// remove AddressRegistrationTlv if no address to be echoed back
|
||||
aMessage.SetLength(startOffset);
|
||||
}
|
||||
tlv.SetLength(length);
|
||||
aMessage.Write(startOffset, sizeof(tlv), &tlv);
|
||||
|
||||
exit:
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user