linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* netfilter: br_netfilter:NS packet was incorrectly matched by the nftables rule
@ 2025-08-14 12:07 gaoxingwang
  2025-08-14 12:43 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: gaoxingwang @ 2025-08-14 12:07 UTC (permalink / raw)
  To: netdev, linux-kernel, davem, bridge, netfilter-devel, idosch,
	pablo, kadlec
  Cc: yanan, xuchunxiao3, huyizhen2

Hello,everyone:
In my test case, the container (with net.bridge.bridge-nf-call-ip6tables=1 set) attempts
to ping the host's IPv6 address through a bridged network. Simultaneously, tcpdump is used to monitor
the bridge, and it is observed that the ping fails.

The direct cause of the ping failure is that the NS packet matches the "ct state invalid drop"
rule in nftables and is therefore discarded.

The commit 751de2012eafa4d46d80 introduced a modification to bridge traffic handling. When the bridge
is in promiscuous mode, it resets the conntrack state of the packets. 
>	if (promisc) {
>		nf_reset_ct(skb);
>		return NF_ACCEPT;
>	}
IPv6 NS packets are untracked by default.When an IPv6 NS packet passes through the bridge and the bridge
is in promiscuous mode, the conntrack state of the packet is reset. If there is a firewall rule
such as "ct state invalid drop," the IPv6 NS packet will be deemed invalid and dropped, leading to
a ping failure issue.

Is this a bug, or is there an issue with my analysis? 
Thanks if anyone can reply!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: netfilter: br_netfilter:NS packet was incorrectly matched by the nftables rule
  2025-08-14 12:07 netfilter: br_netfilter:NS packet was incorrectly matched by the nftables rule gaoxingwang
@ 2025-08-14 12:43 ` Florian Westphal
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2025-08-14 12:43 UTC (permalink / raw)
  To: gaoxingwang
  Cc: netdev, linux-kernel, davem, bridge, netfilter-devel, idosch,
	pablo, kadlec, yanan, xuchunxiao3, huyizhen2

gaoxingwang <gaoxingwang1@huawei.com> wrote:
> Hello,everyone:
> In my test case, the container (with net.bridge.bridge-nf-call-ip6tables=1 set) attempts
> to ping the host's IPv6 address through a bridged network. Simultaneously, tcpdump is used to monitor
> the bridge, and it is observed that the ping fails.
> 
> The direct cause of the ping failure is that the NS packet matches the "ct state invalid drop"
> rule in nftables and is therefore discarded.
> 
> The commit 751de2012eafa4d46d80 introduced a modification to bridge traffic handling. When the bridge
> is in promiscuous mode, it resets the conntrack state of the packets. 
> >	if (promisc) {
> >		nf_reset_ct(skb);
> >		return NF_ACCEPT;
> >	}
> IPv6 NS packets are untracked by default.When an IPv6 NS packet passes through the bridge and the bridge
> is in promiscuous mode, the conntrack state of the packet is reset. If there is a firewall rule
> such as "ct state invalid drop," the IPv6 NS packet will be deemed invalid and dropped, leading to
> a ping failure issue.
> 
> Is this a bug, or is there an issue with my analysis? 

net.bridge.bridge-nf-call-ip6tables and bridge conntrack are
incompatible.

Either use ipv6 conntrack with net.bridge.bridge-nf-call-ip6tables or
disable net.bridge.bridge-nf-call-ip6tables.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-14 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 12:07 netfilter: br_netfilter:NS packet was incorrectly matched by the nftables rule gaoxingwang
2025-08-14 12:43 ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).