Netdev List
 help / color / mirror / Atom feed
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 06/13] netfilter: nft_flow_offload: do not offload multicast
Date: Tue, 17 Nov 2026 00:22:49 +0000	[thread overview]
Message-ID: <179487496989.3136.17890972366589039395@kernel.org> (raw)
In-Reply-To: <20261116001612.2806263-7-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] Commit "netfilter: nft_flow_offload: do not offload multicast"
  fixes a long-standing bug that users can see, but it has no Fixes: tag.

--

netfilter: nft_flow_offload: do not offload multicast

This commit makes nft_flow_offload_skip() skip packets with a multicast
destination address for both IPv4 and IPv6. Before this, IPv4 multicast
stayed out of the flowtable only because the reverse route lookup failed.
IPv6 multicast forwarded by ip6mr could be offloaded and then keep
sending to a stale output.

> 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]
This isn't a bug, but should this patch carry a Fixes: tag?

Before this change, nft_flow_offload_skip() returned false for IPv6.
Nothing else in nft_flow_offload_eval() rejected a multicast destination,
so IPv6 multicast forwarded by ip6mr reached the flow offload expression
through the FORWARD hook:

net/ipv6/ip6mr.c:ip6mr_forward2() {
    ...
	return NF_HOOK(NFPROTO_IPV6, NF_INET_FORWARD,
		       net, NULL, skb, indev, skb->dev,
		       ip6mr_forward2_finish);
    ...
}

A flowtable entry could then be created for it. That entry keeps sending
to the output it resolved when it was added, even after the last listener
leaves, and the mroute counters stop.

The IPv6 path seems to have been offloadable since the flow offload
expression was added, so the likely target would be:

Fixes: a3c90f7a2323 ("netfilter: nf_tables: flow offload expression")

Most of the other fixes in the same pull request carry Fixes: tags, for
example "netfilter: flowtable: purge entries immediately when destroying
the flowtable" and "netfilter: flowtable: do not clear the offload bit
twice". Without a tag here, stable maintainers have no way to tell which
trees need this fix.

>  	}
>  
>  	return false;

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261116001612.2806263-2-pablo%40netfilter.org

  reply	other threads:[~2026-11-17  0:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  0:15 [PATCH net-next,v2 00/13] Netfilter updates for net-next Pablo Neira Ayuso
2026-11-16  0:16 ` [PATCH net-next 01/13] netfilter: flowtable: do not hw offload flows in teardown state Pablo Neira Ayuso
2026-11-16  0:23   ` netdev-bot+sinfo
2026-11-16  0:27     ` Pablo Neira Ayuso
2026-11-17  0:22   ` netdev-bot+sashiko
2026-11-16  0:16 ` [PATCH net-next 02/13] netfilter: flowtable: retrieve stats on flow deletion Pablo Neira Ayuso
2026-11-17  0:22   ` netdev-bot+sashiko
2026-11-16  0:16 ` [PATCH net-next 03/13] net: ethernet: mtk_ppe: update " Pablo Neira Ayuso
2026-11-17  0:22   ` netdev-bot+sashiko
2026-11-16  0:16 ` [PATCH net-next 04/13] net: airoha: " Pablo Neira Ayuso
2026-11-17  0:22   ` netdev-bot+sashiko
2026-11-16  0:16 ` [PATCH net-next 05/13] netfilter: xt_time: fix monthday computation for dates past 2039 Pablo Neira Ayuso
2026-11-17  0:22   ` netdev-bot+sashiko
2026-11-16  0:16 ` [PATCH net-next 06/13] netfilter: nft_flow_offload: do not offload multicast Pablo Neira Ayuso
2026-11-17  0:22   ` netdev-bot+sashiko [this message]
2026-11-16  0:16 ` [PATCH net-next 07/13] netfilter: flowtable: purge entries immediately when destroying the flowtable Pablo Neira Ayuso
2026-11-17  0:22   ` netdev-bot+sashiko
2026-11-16  0:16 ` [PATCH net-next 08/13] selftests: netfilter: nf_queue: drop the no-op loop initializer Pablo Neira Ayuso
2026-11-16  0:16 ` [PATCH net-next 09/13] netfilter: flowtable: do not scrub as crossing netns Pablo Neira Ayuso
2026-11-17  0:22   ` netdev-bot+sashiko
2026-11-16  0:16 ` [PATCH net-next 10/13] netfilter: flowtable: tunnel device poisons h_source of fast-path frames Pablo Neira Ayuso
2026-11-16  0:16 ` [PATCH net-next 11/13] netfilter: flowtable: do not clear the offload bit twice Pablo Neira Ayuso
2026-11-16  0:16 ` [PATCH net-next 12/13] netfilter: nfnetlink_queue: make skb writable before writing NFQA_L2HDR Pablo Neira Ayuso
2026-11-16  0:16 ` [PATCH net-next 13/13] selftests: netfilter: add UDP flowtable offload test Pablo Neira Ayuso
2026-11-17  0:22   ` 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=179487496989.3136.17890972366589039395@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