mirror of
https://github.com/espressif/openthread.git
synced 2026-10-18 05:28:10 +00:00
[core] update tmf rules to allow link local multicast address as dest (#2865)
This commit is contained in:
@@ -191,13 +191,14 @@ bool ThreadNetif::IsTmfMessage(const Ip6::MessageInfo &aMessageInfo)
|
|||||||
|
|
||||||
// A TMF message must comply with following rules:
|
// 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,
|
// 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.
|
// 2. Both the destination and the source are Link-Local Addresses.
|
||||||
VerifyOrExit(
|
VerifyOrExit(
|
||||||
((mMleRouter.IsMeshLocalAddress(aMessageInfo.GetSockAddr()) ||
|
((mMleRouter.IsMeshLocalAddress(aMessageInfo.GetSockAddr()) ||
|
||||||
aMessageInfo.GetSockAddr().IsLinkLocalMulticast() || aMessageInfo.GetSockAddr().IsRealmLocalMulticast()) &&
|
aMessageInfo.GetSockAddr().IsLinkLocalMulticast() || aMessageInfo.GetSockAddr().IsRealmLocalMulticast()) &&
|
||||||
mMleRouter.IsMeshLocalAddress(aMessageInfo.GetPeerAddr())) ||
|
mMleRouter.IsMeshLocalAddress(aMessageInfo.GetPeerAddr())) ||
|
||||||
(aMessageInfo.GetSockAddr().IsLinkLocal() && aMessageInfo.GetPeerAddr().IsLinkLocal()),
|
((aMessageInfo.GetSockAddr().IsLinkLocal() || aMessageInfo.GetSockAddr().IsLinkLocalMulticast()) &&
|
||||||
|
aMessageInfo.GetPeerAddr().IsLinkLocal()),
|
||||||
rval = false);
|
rval = false);
|
||||||
exit:
|
exit:
|
||||||
return rval;
|
return rval;
|
||||||
|
|||||||
Reference in New Issue
Block a user