From 12040b7275ff4fa4a7011ff1f559625480998700 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Thu, 13 Jul 2017 13:49:27 -0700 Subject: [PATCH] [mle] reset last heard on receiving MLE Parent Request (#1991) When a child is not attached, set the last heard and timeout values on receiving an MLE Parent Request message. This ensures that the child state is not prematurely timed out when a child is trying to attach. --- src/core/thread/mle_router.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index 7d1efe11b..e17fd582a 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -1706,7 +1706,10 @@ otError MleRouter::HandleParentRequest(const Message &aMessage, const Ip6::Messa child->ResetLinkFailures(); child->SetState(Neighbor::kStateParentRequest); child->SetDataRequestPending(false); + } + if (!child->IsStateValidOrRestoring()) + { child->SetLastHeard(TimerMilli::GetNow()); child->SetTimeout(TimerMilli::MsecToSec(kMaxChildIdRequestTimeout)); }