[mle] enhance IsExpectedToBecomeRouter() (#5261)

This commit is contained in:
Rongli Sun
2020-07-20 23:27:56 -07:00
committed by GitHub
parent 5f01bc48f5
commit 57ee45be21
+2 -2
View File
@@ -4115,8 +4115,8 @@ exit:
bool MleRouter::IsExpectedToBecomeRouter(void) const
{
return IsRouterEligible() && !IsRouterOrLeader() &&
(Get<RouterTable>().GetActiveRouterCount() < GetRouterUpgradeThreshold()) && !mAddressSolicitRejected;
return IsRouterEligible() && IsChild() && !mAddressSolicitRejected &&
(GetRouterSelectionJitterTimeout() != 0 || mAddressSolicitPending);
}
void MleRouter::HandleAddressSolicit(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo)