mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 21:57:47 +00:00
[mle] solution for MLE Announce processing corner case (#1984)
* Solution for MLE Announce processing corner case Adding an additional check to prevent executing SendAnnounce in case localtimestamp and timestamp are equal
This commit is contained in:
@@ -3006,10 +3006,17 @@ otError Mle::HandleAnnounce(const Message &aMessage, const Ip6::MessageInfo &aMe
|
||||
netif.GetMac().SetPanId(panid.GetPanId());
|
||||
Start(false, true);
|
||||
}
|
||||
else
|
||||
else if (localTimestamp->Compare(timestamp) < 0)
|
||||
{
|
||||
SendAnnounce(static_cast<uint8_t>(channel.GetChannel()), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// do nothing
|
||||
// timestamps are equal: no behaviour specified by the Thread spec.
|
||||
// If SendAnnounce is executed at this point, there exists a scenario where
|
||||
// multiple devices keep sending MLE Announce messages to one another indefinitely.
|
||||
}
|
||||
|
||||
exit:
|
||||
OT_UNUSED_VARIABLE(aMessageInfo);
|
||||
|
||||
Reference in New Issue
Block a user