net: ipv6: check if multicast packet was forwarded

This commit adds a check to determine if the packet wasn't already
forwarded to a given interface.

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
This commit is contained in:
Konrad Derda 2024-03-26 17:25:00 +01:00 committed by Alberto Escolar
parent df34742df7
commit 97fc5ea597

View file

@ -549,7 +549,7 @@ enum net_verdict net_ipv6_input(struct net_pkt *pkt, bool is_loopback)
}
if (IS_ENABLED(CONFIG_NET_ROUTE_MCAST) &&
net_ipv6_is_addr_mcast((struct in6_addr *)hdr->dst)) {
net_ipv6_is_addr_mcast((struct in6_addr *)hdr->dst) && !net_pkt_forwarding(pkt)) {
/* If the packet is a multicast packet and multicast routing
* is activated, we give the packet to the routing engine.
*