[mle] record child netdata versions in HandleChildUpdateRequest() (#7157)

Thread Specification allows a parent to update child network data by
sending a unicast MLE Data Response. Receiving the child's Leader Data
in a MLE Child Update Request message should serve as an
acknowledgment when the network data is received.
This commit is contained in:
Jonathan Hui
2021-11-12 12:22:38 -08:00
committed by GitHub
parent 543e32d2ae
commit 5e0d1b1a32
+9
View File
@@ -2481,6 +2481,15 @@ void MleRouter::HandleChildUpdateRequest(const Message &aMessage, const Ip6::Mes
switch (ReadLeaderData(aMessage, leaderData))
{
case kErrorNone:
if (child->IsFullNetworkData())
{
child->SetNetworkDataVersion(leaderData.GetDataVersion());
}
else
{
child->SetNetworkDataVersion(leaderData.GetStableDataVersion());
}
break;
case kErrorNotFound:
break;
default: