From 2a6a0b0a6a0c4d9cbea56b9a6e19b4db2d33d1e6 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 13 Jul 2017 16:29:26 +0200 Subject: [PATCH] [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 --- src/core/thread/mle.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index fa3f9e305..1707fe3eb 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -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(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);