[mle] fix bug in child link sync after reset (#2135)

This commit fixes a bug when a child coming out of reset attempts to
re-establish the link to its parent.  Upon coming out of reset, a child
will restore state from non-volatile memory, including its IEEE 802.15.4
Short Address.  If the child fails to receive an MLE Child Update Response,
it begins the normal MLE Attach process in search for a new parent.  However,
prior to this commit, the device would not reset its state back to the
detached state.  As a result, a child may be stuck sending IEEE 802.15.4
Data Request messages using its old (probably invalid) Short Address.

This commit also enables retransmission of MLE Child Update Request
messages immediately after a reset.  This increases the child's likelihood
of maintaining its existing parent, which is a desirable property in Thread.
This commit is contained in:
Jonathan Hui
2017-08-25 10:20:25 -07:00
committed by GitHub
parent f29de59077
commit b182d8d046
+1 -2
View File
@@ -1286,8 +1286,7 @@ void Mle::HandleParentRequestTimer(void)
break;
case kParentSynchronize:
mParentRequestState = kParentIdle;
BecomeChild(kAttachAny);
SendChildUpdateRequest();
break;
case kParentRequestStart: