mirror of
https://github.com/espressif/openthread.git
synced 2026-09-08 18:20:06 +00:00
Mle: Ensure to send/queue the "Child Update Response" before the "Data Request" (#1372)
This commit adds two fixes in `Mle::HandleChildUpdateRequest()`: - "Child Update Response" is queued/sent before the "Data Request". This change addresses the issue during parent reset recovery where (without this change) the parent would receive the "Data Request" before the "Child Update Response" and would ignore it (as the child is still being restored). - The `tlv length` parameter in call to `SendDataRequest()` is fixed. This change addresses the issue where incorrect (number of) TLVs were being requested/appended to the "Data Request" message.
This commit is contained in:
committed by
Jonathan Hui
parent
8616cf894e
commit
d8ca7ac164
@@ -2842,13 +2842,13 @@ ThreadError Mle::HandleChildUpdateRequest(const Message &aMessage, const Ip6::Me
|
||||
tlvs[numTlvs++] = Tlv::kLinkFrameCounter;
|
||||
}
|
||||
|
||||
SuccessOrExit(error = SendChildUpdateResponse(tlvs, numTlvs, challenge));
|
||||
|
||||
if (mRetrieveNewNetworkData)
|
||||
{
|
||||
SendDataRequest(aMessageInfo.GetPeerAddr(), dataRequestTlvs, sizeof(tlvs), 0);
|
||||
SendDataRequest(aMessageInfo.GetPeerAddr(), dataRequestTlvs, sizeof(dataRequestTlvs), 0);
|
||||
}
|
||||
|
||||
SuccessOrExit(error = SendChildUpdateResponse(tlvs, numTlvs, challenge));
|
||||
|
||||
exit:
|
||||
return error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user