From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.70.190.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792484612; b=iL+GC3TnybwXU4IJC/qnGqy4VJ5cOI0rwkAaTZGhLLzFtFiRsmn3fHhC4vVjnJoyuM2A DnpSkhE04eeFkEbLZv5YBGIpG5Us1OzfVSFSVM0e3d3VALQDDcQB5o6EXn58nAzN2pt+5 ejZXBR4vLOLIEwUkZn+Vszpxl74U4kRbCoCfo4B6VLirqvOw23sH5qurI0NizP/PeLjQJ HuPM7wZs15MZzRf3HGLzjBUCUpS5leq3zsrVT6tzhlEIy9MCPdma5TrQF+PCtbe6ObUrt i5K+QOzH4esNGQ+NUKiC3Z+gSY8iEthC00sgaKf5G4bEHGX9eXoakH6ysQKyESPGz/g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792484612; 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=YafJaeYm0WpbnULf/K8V2kMs8kjd97jkD1/uWUJes7au7dzLG2kWCylcmZRfbTA/bqDj IhKzZdzY4YomR9snFI0avTCMS5k1zfuyGyxbQ/pSQmNzytpFkN6nLhJaESBwSGDfGZG79 SPAj8QZR6bpSNvAOrthR3n5l9WML6xeQfNJceb9/GeGWOa3XUmr0ITmh5MS4yJMQSA6w3 av7gBFY/iZeEDdlkSHihV74R1ypoBMrWgQ2HBUHdM8f4zLRpsut6EioK1wpnFSwRLWSgP C67kl8wXOeJusNeigK1JcgoAJh/C/28XlQqUimqGQQ+n2dWHxQuByZWdpTcycxY2lFQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=netfilter.org; spf=pass smtp.mailfrom=netfilter.org; arc=none smtp.remote-ip=217.70.190.124 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 E9A5E606A31C for ; Tue, 20 Oct 2026 08:23:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E9A5E606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org 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== 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) Date: Tue, 20 Oct 2026 10:23:20 +0200 From: Pablo Neira Ayuso To: Laveesh Bansal Cc: Florian Westphal , Nikolay Aleksandrov , Ido Schimmel , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, bridge@lists.linux.dev, netdev@vger.kernel.org Subject: Re: [PATCH 1/2] netfilter: bridge: refragment packets with a vlan tag moved by the bridge Message-ID: References: <20261020000308.37362-1-laveeshb@laveeshbansal.com> <20261020005403.38212-1-laveeshb@laveeshbansal.com> X-Mailing-List: bridge@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261020005403.38212-1-laveeshb@laveeshbansal.com> 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.