[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:
Thomas
2017-07-13 07:29:26 -07:00
committed by Jonathan Hui
parent 06b523f3bd
commit 2a6a0b0a6a
+8 -1
View File
@@ -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);