mirror of
https://github.com/espressif/openthread.git
synced 2026-08-01 00:27:47 +00:00
[network-data] limit router upgrade delay when registering (#6613)
If a device is a REED and waiting the random delay to upgrade to a router, the device will wait to register its network data, since it will have to register again after upgrading to a router. However, the maximum delay for becoming a router is up to 2 minutes, which is a long time to wait. This commit limits the delay that a device will wait to register its network data.
This commit is contained in:
@@ -321,7 +321,7 @@ void DuaManager::HandleNotifierEvents(Events aEvents)
|
||||
// Wait for link establishment with neighboring routers.
|
||||
UpdateRegistrationDelay(kNewRouterRegistrationDelay);
|
||||
}
|
||||
else if (mle.IsExpectedToBecomeRouter())
|
||||
else if (mle.IsExpectedToBecomeRouterSoon())
|
||||
{
|
||||
// Will check again in case the device decides to stay REED when jitter timeout expires.
|
||||
UpdateRegistrationDelay(mle.GetRouterSelectionJitterTimeout() + kNewRouterRegistrationDelay + 1);
|
||||
@@ -435,7 +435,7 @@ void DuaManager::PerformNextRegistration(void)
|
||||
// Only send DUA.req when necessary
|
||||
#if OPENTHREAD_CONFIG_DUA_ENABLE
|
||||
#if OPENTHREAD_FTD
|
||||
VerifyOrExit(mle.IsRouterOrLeader() || !mle.IsExpectedToBecomeRouter(), error = kErrorInvalidState);
|
||||
VerifyOrExit(mle.IsRouterOrLeader() || !mle.IsExpectedToBecomeRouterSoon(), error = kErrorInvalidState);
|
||||
#endif
|
||||
VerifyOrExit(mle.IsFullThreadDevice() || mle.GetParent().IsThreadVersion1p1(), error = kErrorInvalidState);
|
||||
#endif // OPENTHREAD_CONFIG_DUA_ENABLE
|
||||
|
||||
Reference in New Issue
Block a user