mirror of
https://github.com/espressif/openthread.git
synced 2026-07-30 23:57:47 +00:00
[mle] simplify tracking of registered DUA address by child (#9137)
This commit is contained in:
@@ -758,12 +758,11 @@ exit:
|
||||
}
|
||||
}
|
||||
|
||||
void DuaManager::UpdateChildDomainUnicastAddress(const Child &aChild, Mle::ChildDuaState aState)
|
||||
void DuaManager::HandleChildDuaAddressEvent(const Child &aChild, ChildDuaAddressEvent aEvent)
|
||||
{
|
||||
uint16_t childIndex = Get<ChildTable>().GetChildIndex(aChild);
|
||||
|
||||
if ((aState == Mle::ChildDuaState::kRemoved || aState == Mle::ChildDuaState::kChanged) &&
|
||||
mChildDuaMask.Get(childIndex))
|
||||
if ((aEvent == kAddressRemoved || aEvent == kAddressChanged) && mChildDuaMask.Get(childIndex))
|
||||
{
|
||||
// Abort on going proxy DUA.req for this child
|
||||
if (mChildIndexDuaRegistering == childIndex)
|
||||
@@ -775,8 +774,8 @@ void DuaManager::UpdateChildDomainUnicastAddress(const Child &aChild, Mle::Child
|
||||
mChildDuaRegisteredMask.Set(childIndex, false);
|
||||
}
|
||||
|
||||
if (aState == Mle::ChildDuaState::kAdded || aState == Mle::ChildDuaState::kChanged ||
|
||||
(aState == Mle::ChildDuaState::kUnchanged && !mChildDuaMask.Get(childIndex)))
|
||||
if (aEvent == kAddressAdded || aEvent == kAddressChanged ||
|
||||
(aEvent == kAddressUnchanged && !mChildDuaMask.Get(childIndex)))
|
||||
{
|
||||
if (mChildDuaMask == mChildDuaRegisteredMask)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user