From 19c73f8b66573eabbf880a6e64cd6cfb2ca4125e Mon Sep 17 00:00:00 2001 From: rongli Date: Sat, 7 Jul 2018 12:43:32 +0800 Subject: [PATCH] [core] update tmf rules to allow link local multicast address as dest (#2865) --- src/core/thread/thread_netif.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/thread/thread_netif.cpp b/src/core/thread/thread_netif.cpp index e6d224b1d..166c7730b 100644 --- a/src/core/thread/thread_netif.cpp +++ b/src/core/thread/thread_netif.cpp @@ -191,13 +191,14 @@ bool ThreadNetif::IsTmfMessage(const Ip6::MessageInfo &aMessageInfo) // A TMF message must comply with following rules: // 1. The destination is a Mesh Local Address or a Link-Local Multicast Address or a Realm-Local Multicast Address, - // and the source is a Mesh Local Address. + // and the source is a Mesh Local Address. Or // 2. Both the destination and the source are Link-Local Addresses. VerifyOrExit( ((mMleRouter.IsMeshLocalAddress(aMessageInfo.GetSockAddr()) || aMessageInfo.GetSockAddr().IsLinkLocalMulticast() || aMessageInfo.GetSockAddr().IsRealmLocalMulticast()) && mMleRouter.IsMeshLocalAddress(aMessageInfo.GetPeerAddr())) || - (aMessageInfo.GetSockAddr().IsLinkLocal() && aMessageInfo.GetPeerAddr().IsLinkLocal()), + ((aMessageInfo.GetSockAddr().IsLinkLocal() || aMessageInfo.GetSockAddr().IsLinkLocalMulticast()) && + aMessageInfo.GetPeerAddr().IsLinkLocal()), rval = false); exit: return rval;