From 822f464b9e18cf4932fa468c320358b8509f58e0 Mon Sep 17 00:00:00 2001 From: Simon Lin Date: Sat, 15 May 2021 01:23:26 +0800 Subject: [PATCH] [dua] send DUA.ntf to notify Child of unsuccessful DUA registration (#6625) Parent should send DUA.ntf to Child that requested the DUA when status is not ST_DUA_SUCCESS, according to Thread 1.2 Spec. 5.23.6.2. Fixes DUA-TC-17. --- src/core/thread/dua_manager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/thread/dua_manager.cpp b/src/core/thread/dua_manager.cpp index fbbce8cb0..d684fc2e3 100644 --- a/src/core/thread/dua_manager.cpp +++ b/src/core/thread/dua_manager.cpp @@ -663,7 +663,6 @@ Error DuaManager::ProcessDuaResponse(Coap::Message &aMessage) break; case ThreadStatusTlv::kDuaInvalid: case ThreadStatusTlv::kDuaDuplicate: - SendAddressNotification(target, static_cast(status), *child); IgnoreError(child->RemoveIp6Address(target)); mChildDuaMask.Set(mChildIndexDuaRegistering, false); mChildDuaRegisteredMask.Set(mChildIndexDuaRegistering, false); @@ -674,6 +673,11 @@ Error DuaManager::ProcessDuaResponse(Coap::Message &aMessage) UpdateReregistrationDelay(); break; } + + if (status != ThreadStatusTlv::kDuaSuccess) + { + SendAddressNotification(target, static_cast(status), *child); + } } #endif // OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_DUA_ENABLE