From: netdev-bot+sashiko@kernel.org
To: pablo@netfilter.org
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
Subject: Re: [PATCH net-next 07/15] netfilter: nft_flow_offload: do not offload multicast
Date: Sat, 14 Nov 2026 03:23:45 +0000 [thread overview]
Message-ID: <179462662560.2199510.13407170160389207306@kernel.org> (raw)
In-Reply-To: <20261113031251.2437074-8-pablo@netfilter.org>
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
next prev parent reply other threads:[~2026-11-14 3:23 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 3:12 [PATCH net-next 00/15] Netfilter updates for net-next Pablo Neira Ayuso
2026-11-13 3:12 ` [PATCH net-next 01/15] netfilter: flowtable: do not hw offload flows in teardown state Pablo Neira Ayuso
2026-11-13 3:17 ` netdev-bot+sinfo
2026-11-13 3:24 ` Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 02/15] netfilter: flowtable: fix pmtu discovery in nf_flow_tunnel_ip6ip6_push() Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 03/15] netfilter: flowtable: retrieve stats on flow deletion Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 04/15] net: ethernet: mtk_ppe: update " Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 05/15] net: airoha: " Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 06/15] netfilter: xt_time: fix monthday computation for dates past 2039 Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 07/15] netfilter: nft_flow_offload: do not offload multicast Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko [this message]
2026-11-13 3:12 ` [PATCH net-next 08/15] netfilter: lwtunnel: expose read-only sysctl nf_hooks_lwtunnel for non init-netns Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 09/15] netfilter: flowtable: purge entries immediately when destroying the flowtable Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 10/15] selftests: netfilter: nf_queue: drop the no-op loop initializer Pablo Neira Ayuso
2026-11-13 3:12 ` [PATCH net-next 11/15] netfilter: flowtable: do not scrub as crossing netns Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 12/15] netfilter: flowtable: tunnel device poisons h_source of fast-path frames Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
2026-11-13 3:12 ` [PATCH net-next 13/15] netfilter: flowtable: do not clear the offload bit twice Pablo Neira Ayuso
2026-11-13 3:12 ` [PATCH net-next 14/15] netfilter: nfnetlink_queue: make skb writable before writing NFQA_L2HDR Pablo Neira Ayuso
2026-11-13 3:12 ` [PATCH net-next 15/15] selftests: netfilter: add UDP flowtable offload test Pablo Neira Ayuso
2026-11-14 3:23 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179462662560.2199510.13407170160389207306@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=ja@ssi.bg \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox