From 52777e8f8d474f7f38d9a4909e6c4cdb58d9518a Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Fri, 18 Feb 2022 13:51:44 -0800 Subject: [PATCH] [mle] check router ID match when sending Child Id Response (#7428) This commit updates the `SendChildIdResponse()` to check in the case that the child already has a previously assigned RLOC16 that it matches the current router ID of the parent and if not we assign a new RLOC16 to it in the "Child ID response". --- src/core/thread/mle_router.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index cbad84ffb..79da6a099 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -3078,7 +3078,7 @@ Error MleRouter::SendChildIdResponse(Child &aChild) SuccessOrExit(error = AppendActiveTimestamp(*message)); SuccessOrExit(error = AppendPendingTimestamp(*message)); - if (aChild.GetRloc16() == 0) + if ((aChild.GetRloc16() == 0) || !RouterIdMatch(aChild.GetRloc16(), GetRloc16())) { uint16_t rloc16;