mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 21:57:47 +00:00
[mle] update HandleAdv to not exit when deciding to promote to router (#8645)
This commit updates `MleRouter::HandleAdvertisement()` to not call `ExitNow()` and exit early when as a child we decide to try to promote to router role and set `mRouterSelectionJitterTimeout`. This ensures that we continue processing the message and call `UpdateRoutesOnFed()` and `router->SetLastHeard()`.
This commit is contained in:
@@ -1259,7 +1259,6 @@ Error MleRouter::HandleAdvertisement(RxInfo &aRxInfo, uint16_t aSourceAddress, c
|
||||
if ((mRouterSelectionJitterTimeout == 0) && (mRouterTable.GetActiveRouterCount() < mRouterUpgradeThreshold))
|
||||
{
|
||||
mRouterSelectionJitterTimeout = 1 + Random::NonCrypto::GetUint8InRange(0, mRouterSelectionJitter);
|
||||
ExitNow();
|
||||
}
|
||||
|
||||
mRouterTable.UpdateRoutesOnFed(routeTlv, routerId);
|
||||
|
||||
Reference in New Issue
Block a user