🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #5358

Re: [PATCH 1/2] netfilter: bridge: refragment packets with a vlan tag moved by the bridge

#5358
From: Pablo Neira Ayuso
Date: Tue, 20 Oct 2026 08:23
44 lines
10332 bytes
On Mon, Oct 19, 2026 at 05:54:03PM -0700, Laveesh Bansal wrote:
> With vlan_filtering enabled, br_allowed_ingress() moves the vlan tag back
> into the packet when its protocol differs from the bridge's vlan_protocol,
> an 802.1Q tag on an 802.1ad bridge for instance, and sets skb->protocol to
> the vlan ethertype. That happens after the NF_BR_PRE_ROUTING hooks.
> 
> Bridge conntrack has already defragmented the packet by then, based on the
> original protocol. In postrouting nf_ct_bridge_refrag() finds a vlan
> ethertype it cannot fragment, warns and drops the packet:
> 
>  WARNING: net/bridge/netfilter/nf_conntrack_bridge.c:361 at nf_ct_bridge_post
>  Call trace:
>   nf_ct_bridge_post
>   nf_hook_slow
>   br_forward_finish
>   __br_forward
>   deliver_clone
>   br_flood
>   br_handle_frame_finish
>   br_handle_frame
> 
> The warning is the smaller problem. Every fragmented IPv4 or IPv6 packet
> that crosses such a bridge is dropped while unfragmented traffic is fine,
> so it looks like an MTU issue. And anyone who can send fragments into a
> port of such a bridge can trigger the warning, which takes the machine
> down with panic_on_warn.
> 
> Look past the vlan tag in nf_ct_bridge_refrag(): remember it, pull it,
> fragment as before and push it back onto each fragment in
> nf_ct_bridge_frag_restore(), together with the outer protocol, so that
> br_dev_queue_push_xmit() sees the fragments like any other tagged frame.
> The protocol behind the tag comes from the packet, so check it against the
> header before fragmenting.
> 
> Removing the WARN_ON_ONCE() would only hide the problem, the packets would
> still be dropped. Not tracking these frames in nf_ct_bridge_pre() instead
> would change what is tracked today for unfragmented traffic, and would have
> to duplicate the decision that br_allowed_ingress() makes later.

Yes, but let's just fix this by turning this into a
DEBUG_NET_WARN_ON_ONCE(1) and let the packet be dropped.

Then, we can follow up to fill the gap for this feature in in nf-next.
Technical Details
Message-ID: <atck-NoWvemxIsF6@chamomile>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349111-linux-kernel-netdev=dewy.ru
References: <20261020000308.37362-1-laveeshb@laveeshbansal.com> <20261020005403.38212-1-laveeshb@laveeshbansal.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349111-linux-kernel-netdev=dewy.ru
From: pablo@netfilter.org (Pablo Neira Ayuso)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH 1/2] netfilter: bridge: refragment packets with a vlan
 tag moved by the bridge
Date: Tue, 20 Oct 2026 10:23:20 +0200
Organization: Usenet Network
Message-ID: <atck-NoWvemxIsF6@chamomile>
References: <20261020000308.37362-1-laveeshb@laveeshbansal.com>
 <20261020005403.38212-1-laveeshb@laveeshbansal.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Injection-Info: usenet.network;
	logging-data="3811639"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:O2LeCm7AqfESuOvv5oVjXRnS5Ks= sha256:WR6XgYZ8YA40epIjmWHbCjK6hUR48t+zyM5UFjqA15k=
	sha1:eWb0Vo5mcuJwRn0Xtx/BT5diGDg= sha256:QbvdvS1rZbDeJizoO54QnO1/yRcr7rOVk30Fp+EjYZM=
Content-Disposition: inline
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 38723110C45; Tue, 20 Oct 2026 11:26:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	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=netfilter.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 UdNHQkrEBzrb;
	Tue, 20 Oct 2026 11:26:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-349111-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=netfilter.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 46049110C02; Tue, 20 Oct 2026 11:26:37 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 3849F340F9; Tue, 20 Oct 2026 08:23:34 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
	t=1792484613;
	b=krINEw6HR7vXyJDJoieuwd4WiG0m2zhqHtB2EAkvSG4qVjMUn0dCh2ptjQ7Qcacx3EKh
	 zgG+EDQvbSyJ1HbiJZMLqaNf4swBAOwQY2RMypq5wp/xcIL4b1ZKQzT79ClLeX/YlIOeU
	 CMhL7grn1AtMCtRDdpGmQ/Wheje+7u83lGfryVchRKGvBMCVKEIZyYbionU2dEB4MV6BR
	 g0OjM7be4boGVQP4y4IQTM0jZ+NyqdDoMO6kyLLiK9L2yUtdF8Mk0g+S19cz76WefcKNk
	 +YnNJggvXhWbZirRbMxsjai6elPJFj+E1UePTJugOowYeDnE6PFH2PGXUeRx8UT2SqQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792484613;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=c8b9XjfdKOQjyStjm92ZuKkGIRSFabLgQBgcYtuQkFQ=;
	b=WYIITtrDWGPorWvHLZ10amoZWEY8bWP0WRQElc2sGslF+RAoz0cbNKs2WsUragYEBVPc
	 x6xaqolODNobaxvts59bI7UKBRjQdpunKRGUj/eiFk1fwMuuiwSff2hNjq7knH8WXxUkJ
	 YAWQPE+54/Mse/BxYNBKJ7ZBehWa0h2rre9m2CZaorUkMtvSRu8IPqwIYbg4nM3p+LS7W
	 UEGq4nH3sKeNsiUGUqbWMxAzd5DchiDT0IxG4CXoB3CMKYv0Ty7J/9w4zBTttaoAnzbPI
	 OiFBDh/oUDaRtfd+llhnfFQ9inPdCmeXYGpsizXCIcw7eWxNg7QAFK+ILz/VCAQmTBg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=lagFGVlb;
	dmarc=none header.from=netfilter.org;
	spf=pass smtp.mailfrom=netfilter.org;
	arc=fail 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 99FEE606A31D;
	Tue, 20 Oct 2026 08:23:33 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=lagFGVlb
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.70.190.124
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792484607;
	b=BZTZlRDWJ6VGP7iE+PdtOZ9vUAnAUd8Pjw4zbYcLVNNfT/izOpqp8iEusblSyaYkJiWW
	 i2fyald//nRFKzXScJuTy78HNSZTLQ9K3RZqpWDNyT8N0fgHWxT5iDZH/k9YsXrEyLMs3
	 GcOKJKGV2H+HHJINih453UoNWYXj/aw4AcgXa9BWfRMX8aVs/aLYfgQc0WxZuRPOU8/45
	 eteucf2KVnbnuXe/LxDEnD2CHJMVvHjFr0VR8nPyKtwNJJUfuffD9tJtsK+yW5R++pVRN
	 j7nStACfre88k/i+EwJLpz/8ckqCoh38J1aLMevOEHGC8M9PAbRl0XrE/gPaBf4jvrA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792484607;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To:X-Spam-Status:X-Spam-Checker-Version;
	bh=c8b9XjfdKOQjyStjm92ZuKkGIRSFabLgQBgcYtuQkFQ=;
	b=AItPpFzRq+MygGkv4hk2jy93JiQbauyQP3Be8we6Klz8xmm6FTTJfqas/zBOJRksvRe8
	 mzSpAyLCCpd4pOsC/s0psbKmGqw3ZeNlceTpTSrYB8DLLAIt/SJrxDEt/9Ua3SkSy28Lf
	 zAPahNkhkzpFoPsSTbOkhqHXp1mJ2x0sKDB1GcGgjvCl+UsmfHFcOY+LWBzYDzs5q9cD8
	 5JK/RjPx3inbfycIi8aGh/TQNV6F/c6/wyRUb6Ew/kGect/u9VS8BzaljgaGz4pZHgltt
	 G7W2Rd+XK3kB4onZ5V+fEkySIrIrKkZez6f/VT9IeT/gC/hKsYT3e+E7PwwySyC/jjw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=netfilter.org;
	spf=pass smtp.mailfrom=netfilter.org;
	dkim=pass header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=lagFGVlb;
	arc=none smtp.remote-ip=217.70.190.124
X-Received: from mail.netfilter.org (mail.netfilter.org [217.70.190.124])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with UTF8SMTPS id E98FC606A31B;
	Tue, 20 Oct 2026 08:23:25 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E98FC606A31B
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org;
	s=2025; t=1792484603;
	bh=c8b9XjfdKOQjyStjm92ZuKkGIRSFabLgQBgcYtuQkFQ=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
	b=lagFGVlbecSfkqNHV7xGW7o5dHNBXRP3s/pexhLgj3U0OaPplUGA17J6QLlPWhlfs
	 n81RxixYjZUeMhs5AbRyHQlHHoGlk+WPOoMZxKQ31UjAaLMG25/pte3je6OvHtYFMk
	 h04k4Wqr8mU6HVMTDJKd+nW+TecRkBKMWunlRbRioLyLFDGGq4oAm1/osfxK2uDDBf
	 0ZnDrMlXcxptKj58zBDzTkGjh3UokarQsDpoDhEqPax7KbJvdZ+yIGd7KFp1NZoBcm
	 xMGRZb063xHjA+5ltNt4PrLbXLvTLjOT2Wd22Te67YZnPz8uvUoKwF+ypJbe64zNQk
	 BiNfrSRpLUkMg==
X-Received: from netfilter.org (mail-agni [217.70.190.124])
	by mail.netfilter.org (Postfix) with UTF8SMTPSA id 66F7360056;
	Tue, 20 Oct 2026 10:23:23 +0200 (CEST)
X-Cc: Florian Westphal <fw@strlen.de>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	Ido Schimmel <idosch@nvidia.com>, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org, bridge@lists.linux.dev,
	netdev@vger.kernel.org
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
X-In-Reply-To: <20261020005403.38212-1-laveeshb@laveeshbansal.com>