From 1ec9bce2679a272873ca3f35c90d7e2272f40064 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Wed, 2 Jul 2025 10:25:42 -0700 Subject: [PATCH] [mle] ignore Child Update Request when detached (#11656) This commit updates `Mle` to ensure that a device ignores a received "Child Update Request" message if it is currently detached. This prevents the device from sending a "Child Update Response" in this state. This behavior is particularly important when a device is trying to restore its previous role as a router or leader. --- src/core/thread/mle.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index c7c78fbc1..300aed091 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -3350,16 +3350,20 @@ exit: void Mle::HandleChildUpdateRequest(RxInfo &aRxInfo) { + VerifyOrExit(IsAttached()); + #if OPENTHREAD_FTD if (IsRouterOrLeader()) { HandleChildUpdateRequestOnParent(aRxInfo); + ExitNow(); } - else #endif - { - HandleChildUpdateRequestOnChild(aRxInfo); - } + + HandleChildUpdateRequestOnChild(aRxInfo); + +exit: + return; } void Mle::HandleChildUpdateRequestOnChild(RxInfo &aRxInfo)