mirror of
https://github.com/espressif/openthread.git
synced 2026-09-16 14:10:09 +00:00
[mle] add retransmissions to MLE Link Request on neighbor timeout (#2336)
This commit is contained in:
@@ -64,6 +64,7 @@ enum
|
||||
kParentResponseMaxDelayRouters = 500, ///< Maximum delay for response for Parent Request sent to routers only
|
||||
kParentResponseMaxDelayAll = 1000, ///< Maximum delay for response for Parent Request sent to all devices
|
||||
kUnicastRetransmissionDelay = 1000, ///< Base delay before retransmitting an MLE unicast.
|
||||
kMaxTransmissionCount = 3, ///< Maximum number of times an MLE message may be transmitted.
|
||||
kMaxResponseDelay = 1000, ///< Maximum delay before responding to a multicast request
|
||||
kMaxChildIdRequestTimeout = 5000, ///< Maximum delay for receiving a Child ID Request
|
||||
kMaxChildUpdateResponseTimeout = 2000, ///< Maximum delay for receiving a Child Update Response
|
||||
|
||||
@@ -1935,16 +1935,18 @@ void MleRouter::HandleStateUpdateTimer(void)
|
||||
|
||||
#else
|
||||
|
||||
if (age >= TimerMilli::SecToMsec(kMaxNeighborAge) &&
|
||||
age < TimerMilli::SecToMsec(kMaxNeighborAge) + kStateUpdatePeriod)
|
||||
if (age >= TimerMilli::SecToMsec(kMaxNeighborAge))
|
||||
{
|
||||
otLogInfoMle(GetInstance(), "Router timeout expired");
|
||||
SendLinkRequest(&router);
|
||||
}
|
||||
else if (age >= TimerMilli::SecToMsec(kMaxNeighborAge) + kMaxLinkRequestTimeout)
|
||||
{
|
||||
RemoveNeighbor(router);
|
||||
continue;
|
||||
if (age < TimerMilli::SecToMsec(kMaxNeighborAge) + kMaxTransmissionCount * kUnicastRetransmissionDelay)
|
||||
{
|
||||
otLogInfoMle(GetInstance(), "Router timeout expired");
|
||||
SendLinkRequest(&router);
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveNeighbor(router);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user