]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it
authorHuajian Yang <huajianyang@asrmicro.com>
Thu, 17 Apr 2025 09:29:53 +0000 (17:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:10 +0000 (11:07 +0100)
commit260cbb00910f96f83874ca846285f71ae1dff097
tree1c65caa23a1053a838e37a4b4ad9cab4033a433a
parentea2d796b49585fc6bffe6c72c78f6dcfed698527
netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it

[ Upstream commit aa04c6f45b9224b949aa35d4fa5f8d0ba07b23d4 ]

The config NF_CONNTRACK_BRIDGE will change the bridge forwarding for
fragmented packets.

The original bridge does not know that it is a fragmented packet and
forwards it directly, after NF_CONNTRACK_BRIDGE is enabled, function
nf_br_ip_fragment and br_ip6_fragment will check the headroom.

In original br_forward, insufficient headroom of skb may indeed exist,
but there's still a way to save the skb in the device driver after
dev_queue_xmit.So droping the skb will change the original bridge
forwarding in some cases.

Fixes: 3c171f496ef5 ("netfilter: bridge: add connection tracking system")
Signed-off-by: Huajian Yang <huajianyang@asrmicro.com>
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bridge/netfilter/nf_conntrack_bridge.c
net/ipv6/netfilter.c