From 0823114dfff39dd7d27eeaf1ba4ac3d16002ba86 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Wed, 19 Feb 2020 22:20:01 -0800 Subject: [PATCH] [mle] mark former parent as valid after becoming router (#4582) Commit a8638d7 added logic to invalidate the parent upon a role change. However, when upgrading from child to router, the existing implementation updates the role before copying the parent into into the router table. As a result, a router may not have any connectivity with the rest of the partition until after additional MLE exchanges. This commit marks the newly created router entry as valid so that the router retains connectivity. --- src/core/thread/mle_router.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index b2b0596b2..97b041bbc 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -3988,6 +3988,7 @@ void MleRouter::HandleAddressSolicitResponse(Coap::Message * aMessage, // Keep link to the parent in order to respond to Parent Requests before new link is established. *router = mParent; + router->SetState(Neighbor::kStateValid); router->SetNextHop(kInvalidRouterId); router->SetCost(0);