[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.
This commit is contained in:
Yakun Xu
2024-02-02 12:37:46 -08:00
committed by GitHub
parent b5b9a62db7
commit 74c833b623
+2 -1
View File
@@ -1121,7 +1121,8 @@ Error Ip6::HandleDatagram(OwnedPtr<Message> 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<ThreadNetif>().IsMulticastSubscribed(header.GetDestination()))