From 97fc5ea597466a937c882f55333a1454684f043d Mon Sep 17 00:00:00 2001 From: Konrad Derda Date: Tue, 26 Mar 2024 17:25:00 +0100 Subject: [PATCH] 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 --- subsys/net/ip/ipv6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/net/ip/ipv6.c b/subsys/net/ip/ipv6.c index 2a99abc6b8..d1f1d17635 100644 --- a/subsys/net/ip/ipv6.c +++ b/subsys/net/ip/ipv6.c @@ -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. *