From 74c833b6236ac1dab3673fb8ebd705eca662d2b4 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Sat, 3 Feb 2024 04:37:46 +0800 Subject: [PATCH] [ip6] always deliver multicast to host (#9824) This commit always delivers multicast traffic to host. Without this change, host will not be able to receive link-local and mesh-local multicast traffic, even the host subscribes to some multicast addresses in these scopes. Note that this does not change the host forwarding rules, as link-local and mesh-local traffic are not supposed to be forwarded to adjacent links. --- src/core/net/ip6.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index 4f3b077e0..2334aa712 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -1121,7 +1121,8 @@ Error Ip6::HandleDatagram(OwnedPtr aMessagePtr, const void *aLinkMessag } #endif - forwardHost = header.GetDestination().IsMulticastLargerThanRealmLocal(); + // Always forward multicast packets to host network stack + forwardHost = true; if ((aMessagePtr->IsOriginThreadNetif() || aMessagePtr->GetMulticastLoop()) && Get().IsMulticastSubscribed(header.GetDestination()))