[dua] delay registration for DUA newly added (#5925)

We found that it's possible that a Router, in a topology like above,
could send DUA.req so quickly after receiving Data Response from
Leader that the PBBR is not able to process the same Data Response
message and update the network data accordingly. Consequently, PBBR
sends DUA.rsp with kDuaInvalid status because it can't find a valid
Domain Prefix in the Network Data.

This commit help resolve this issue with two fixes:
- Node to delay for up to 1000ms before sending DUA.req when domain
  prefix addresses is generated
- PBBR to respond with kDuaGeneralFailure to allow the node to
  re-register the same DUA again.
This commit is contained in:
Simon Lin
2020-12-08 10:41:21 -08:00
committed by GitHub
parent 17d813eadd
commit c70e47d16c
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -407,6 +407,7 @@ void Manager::HandleDuaRegistration(const Coap::Message &aMessage, const Ip6::Me
#endif
VerifyOrExit(isPrimary, status = ThreadStatusTlv::kDuaNotPrimary);
VerifyOrExit(Get<BackboneRouter::Leader>().HasDomainPrefix(), status = ThreadStatusTlv::kDuaGeneralFailure);
VerifyOrExit(Get<BackboneRouter::Leader>().IsDomainUnicast(target), status = ThreadStatusTlv::kDuaInvalid);
hasLastTransactionTime = (Tlv::Find<ThreadLastTransactionTimeTlv>(aMessage, lastTransactionTime) == OT_ERROR_NONE);
+3 -1
View File
@@ -326,10 +326,12 @@ void DuaManager::HandleNotifierEvents(Events aEvents)
#endif
}
#if OPENTHREAD_CONFIG_DUA_ENABLE
if (aEvents.ContainsAny(kEventIp6AddressAdded))
{
mRegistrationTask.Post();
UpdateRegistrationDelay(kNewDuaRegistrationDelay);
}
#endif
}
void DuaManager::HandleBackboneRouterPrimaryUpdate(BackboneRouter::Leader::State aState,
+1
View File
@@ -170,6 +170,7 @@ private:
enum
{
kNewRouterRegistrationDelay = 3, ///< Delay (in seconds) for waiting link establishment for a new Router.
kNewDuaRegistrationDelay = 1, ///< Delay (in seconds) for newly added DUA.
};
#if OPENTHREAD_CONFIG_DUA_ENABLE