[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.
This commit is contained in:
Simon Lin
2021-05-14 10:23:26 -07:00
committed by GitHub
parent c74ba05c44
commit 822f464b9e
+5 -1
View File
@@ -663,7 +663,6 @@ Error DuaManager::ProcessDuaResponse(Coap::Message &aMessage)
break;
case ThreadStatusTlv::kDuaInvalid:
case ThreadStatusTlv::kDuaDuplicate:
SendAddressNotification(target, static_cast<ThreadStatusTlv::DuaStatus>(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<ThreadStatusTlv::DuaStatus>(status), *child);
}
}
#endif // OPENTHREAD_FTD && OPENTHREAD_CONFIG_TMF_PROXY_DUA_ENABLE