๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16140

Re: [PATCH net-next 07/15] netfilter: nft_flow_offload: do not offload multicast

#16140
From: netdev-bot+sashiko
Date: Sat, 14 Nov 2026 03:23
73 lines
10271 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message of "netfilter: nft_flow_offload: do not
  offload multicast" describes a bug that users can see, but the patchโ€ฆ

--

netfilter: nft_flow_offload: do not offload multicast

This patch makes nft_flow_offload_skip() skip packets with a multicast
destination for both IPv4 and IPv6. The flowtable then no longer depends
on the ruleset or on the reverse route lookup to keep multicast flows
out.

> diff --git a/net/netfilter/nft_flow_offload.c b/net/netfilter/nft_flow_offload.c
> index d3c5651dd6997..530e20c7fd457 100644
> --- a/net/netfilter/nft_flow_offload.c
> +++ b/net/netfilter/nft_flow_offload.c

[ ... ]

> @@ -33,6 +34,10 @@ static bool nft_flow_offload_skip(struct sk_buff *skb, int family)
>  
>  		if (unlikely(opt->optlen))
>  			return true;
> +
> +		return ipv4_is_multicast(ip_hdr(skb)->daddr);
> +	} else if (family == NFPROTO_IPV6) {
> +		return ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr);

[Severity: Low]
The commit message describes a bug that users can see. IPv6 multicast
forwarded by ip6mr is added to the flowtable, and the flow keeps sending
to the output it resolved even after the last listener leaves. Should
this have a Fixes: tag, and maybe Cc: stable as well?

The path to the bug looks like this:

ip6mr_forward2()
  NF_HOOK(NFPROTO_IPV6, NF_INET_FORWARD, ...)
    nft_flow_offload_eval()
      nft_flow_route()
      flow_offload_add()

In nft_flow_route() in net/netfilter/nf_flow_table_path.c, the reverse
lookup does:

    fl.u.ip6.saddr = ct->tuplehash[!dir].tuple.src.u3.in6;

For a multicast flow in the original direction, that address is the
multicast group. On IPv4, ip_route_output_key_hash_rcu() returns -EINVAL
for a multicast saddr. The IPv6 output lookup has no such check, so
other_dst resolves and the flow is added.

NF_INET_FORWARD is the only hook nft_flow_offload_validate() accepts. A
ruleset with a plain 'flow add @ft' in a forward chain reaches this path
on current kernels.

Without a Fixes: tag, stable and distro backporters have nothing that
points them at this fix. Older kernels would likely keep sending IPv6
multicast to stale outputs.

>  	}
>  
>  	return false;

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113031251.2437074-2-pablo%40netfilter.org
Technical Details
Message-ID: <179462662560.2199510.13407170160389207306@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363071-linux-kernel-netdev=dewy.ru
References: <20261113031251.2437074-8-pablo@netfilter.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363071-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 07/15] netfilter: nft_flow_offload: do not
 offload multicast
Date: Sat, 14 Nov 2026 03:23:45 +0000
Organization: Usenet Network
Message-ID: <179462662560.2199510.13407170160389207306@kernel.org>
References: <20261113031251.2437074-8-pablo@netfilter.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1499703"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:kkLiACHJl3hoGRphGftbB0BMjVo= sha256:LkkbWuePlBkYz6VYB26HX/ZFiC79jIpMjrKVbqdl0Kw=
	sha1:pzFyRe4zpGQHNCDywynaKCy6fp0= sha256:ctfcYoCV1+M3OujM97MIEajPE0RlA2IjQmSvZHskhv0=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 70A17114754; Sat, 14 Nov 2026 06:24:37 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.5
X-Spam-Status: No, score=-3.5 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 6PxfOhK5nk3v;
	Sat, 14 Nov 2026 06:24:33 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-363071-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 6302D1113A9; Sat, 14 Nov 2026 06:24:25 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 9BC4F61645D; Sat, 14 Nov 2026 03:24:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794626627;
	b=u8SzHelL0Ip5vxouAaIlS2i9mw19hiE5UZ95JKz+JZObE8dFZuipaW7kKowm7YNfJJpi
	 +rDecpYpbiUwdvtBw688P0PolK9VIlHVVu8qvz0rq2XWwroGGM3KwLQHpzxDBWhcor9Iu
	 Z67CrxWeaqecoHk0HHFNAzWXkijwlF4vYvxl0Jj5cBJcgCq8e99910xWe1FZo28awuXvE
	 xvxhnUDr3lpbOUCeXbfBypUSge5M7cSfCh+yi8u8qUjugbejzgifAs0Iq3phd7g4y7a67
	 //iVmLdNbedRRGYqJw/Wd0fI/46o3upsHYxIVKA4BKrtaj/3wTSRBRSkZo+HgCujhpQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794626627;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=BOZHaxpcpsJwtqYpgj7ylDSrS3tDSBJJRb8I8JDCWb8=;
	b=oA+IPSh9sRr13/7Mc7u7xdXQ+8diwHjIVLuUaa0vEwbWMoq+ou2osZ4PiLwYGhieQJRK
	 SW9WjotjDl1fF7TrggHuzTarTayjzb8c7ubJ5rORj0kaQQv1HVjOmcc4WnhpNJAfoRx4g
	 gwf3Yz6TwcpTV2b5dx8mKLWytzMT3m4E81dZT87rqZnLnDW0OU6InKxCgCEKx7osB2Cs1
	 rpoQMU1p0NRKYuQEEFxl2y5mTcYdhk8HdERihCm9ChCUtX5rNcAjq7/flrrJ5eCK82i5I
	 CFC5M4wmkN7elmLtpvtbAatBBS2lo0BmKMb0p47bKEI/c4RddVL4NM52JMIp3xEkXpw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AwYpKQio;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 92AE4606A8A9;
	Sat, 14 Nov 2026 03:23:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AwYpKQio
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794626626;
	b=Bu0SF20aFJX5NaB2HBzgGbk1G3nJUCxO1HILNcChDybFoY6h96BCWuHy7Vx7AY25Pxbz
	 RVwCcr21FG/sSfovfDY2IUzVrT4umnjNaEknX+99M94mfTCHtasf4HtMxW7jNfq4BooSm
	 dm/8kUbocz4rREDrHU5fjbWtd5RY/p2/4Ghc3xiVYA/XcrKCnXhRia5IvCsOl4PPevYF1
	 JitRu18wEaHwpbtZSh0iBnBmT++jqxJ2zve6DVHtoP8a8qwx63E26cBOzF84ZNjXLK0OZ
	 VBoo4WuJ2Z5X4ORsWNcr1zlW/xiJZnSyEH8lagsLoxqK2wz6O3M1bJo1LvtzhBc5PoQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794626626;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=BOZHaxpcpsJwtqYpgj7ylDSrS3tDSBJJRb8I8JDCWb8=;
	b=Wzurm3VvVzossEJI8kNJlnl05w2OxQYLKsbxA4jLh3uk+ICa94RGo+6ydny+AJdQV9qJ
	 B1dWduNiYXn3rNlk72o5EB60kRWYNUdc7bmIKh5QdYwOrFYfHxxcHXx+bQSbDxWF4Azk2
	 74CWPtk3sYwu4YQRELm1IIXRy8yE1anhZYFasjui5hKfLonjiHDK5CZwvRiLira/RjvIQ
	 bzMJrJ6t0Iytsdn0C5JIFt4LskMvRcaYreyFOkhDTk7aA14hHiJbKLKVj8Le28X4omlJ3
	 lshLYZMLKtZjRAxHw55Fdj0K/1GaW5B6LQiRXFHE94qnb85uuPdl5prcn3yO6ufZiyQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AwYpKQio;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id B33E7606A8B1;
	Sat, 14 Nov 2026 03:23:46 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BC991F000C4;
	Sat, 14 Nov 2026 03:23:45 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794626626;
	bh=BOZHaxpcpsJwtqYpgj7ylDSrS3tDSBJJRb8I8JDCWb8=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=AwYpKQiok9rZITNpYWLU9JrIvkJKFkhJVbTcbive8Kbox3rAVbtiwYn8buIjaPqLT
	 b7nD/XxKhy+75KXATJn0NexwvUIOepPcmABS6UrlzIgcyB2F0ydQVNUD9qeA3/xT4a
	 VZrBzwPCGpUeviD7x6IfSBv91iwONShvC/DH6DQKf5Tco5oGHDzXrpu1VdwanD8w78
	 emCI8FcD8KMQP0Ph2ABMTb3dyHd4L4W1zQkpyhDJ2KnFQjNV6lfZb2UAySOZ8O52Vr
	 po5G2cjKI4sX8n9d62wldCWu2KYV4jX9RfR9ONcW725zoYF09MbZnJNI6L5MfHQWi6
	 u3er5VzwsIq0w==
X-Cc: netfilter-devel@vger.kernel.org, davem@davemloft.net,
 netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com,
 edumazet@kernel.org, horms@kernel.org, fw@strlen.de, ja@ssi.bg
X-In-Reply-To: <20261113031251.2437074-8-pablo@netfilter.org>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list