🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #12118

Re: [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet ID reuse and large gaps

#12118
From: Alireza Asgari
Date: Fri, 06 Nov 2026 09:46
105 lines
13492 bytes
Thanks for the review.

I understand that batch verdicts are intended to be used in strict sequence. The scenarios motivating this RFC did not establish a failure under that usage model, and the evidence presented does not justify the additional epoch and missing-boundary handling.

I’ll drop the current series. I also understand that the proposed collision disposition being reasonable does not by itself establish a need for the duplicate-ID guard. I would revisit that separately only if I can provide a concrete use case.

Thanks for taking the time to review it.



From: Florian Westphal <fw@strlen.de>
To: <alireza@asgari.net>
Cc: "Pablo Neira Ayuso"<pablo@netfilter.org>, "Phil Sutter"<phil@nwl.cc>, <netfilter-devel@vger.kernel.org>, <netdev@vger.kernel.org>, <kunit-dev@googlegroups.com>
Date: Fri, 06 Nov 2026 05:54:33 +0100
Subject: Re: [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet ID reuse and large gaps

 > Alireza Asgari via B4 Relay <devnull+alireza.asgari.net@kernel.org> wrote: 
 > > This series addresses packet-ID reuse and batch-verdict ordering in 
 > > NFQUEUE. I am posting it as an RFC to discuss the handling of ambiguous 
 > > batch boundaries and the additional sequence state used to resolve them. 
 >  
 > -v.  I see 0 bugs here.  Only lots of code churn. 
 >  
 > > An old packet can remain queued while newer packets receive individual 
 > > verdicts. 
 >  
 > Not really, that would be a userspace bug.  Its not adviseable to do 
 > out-of-order verdicts.  I know some people do that though :-/ 
 >  
 > > Queue length therefore does not bound the distance between 
 > > pending packet IDs. After a complete 32-bit ID cycle, two pending packets 
 > > can have the same ID, making verdict lookup ambiguous. Even before reuse, 
 > > the signed 32-bit comparison in the batch handler can select the wrong 
 > > FIFO prefix when IDs are separated by half an ID cycle or more. 
 >  
 > WTF, whats the point of doing that? 
 >  
 > > Patch 1 rejects an incoming duplicate ID before list insertion or userspace 
 > > notification, preserving the existing pending packet. The incoming packet 
 > > follows the existing enqueue-failure policy: drop by default, or accept 
 > > with FAIL_OPEN. 
 >  
 > OK, but really... who needs this? 
 >  
 > > Patch 2 uses an exact queued boundary to select the FIFO prefix. For a 
 > > boundary no longer queued, it uses a 64-bit queue sequence and a per-entry 
 > > 32-bit epoch to recover issuance order. Ambiguous missing boundaries 
 > > return -ERANGE without changing the queue. The wire format is unchanged, 
 > > but the rejection behavior is userspace-visible. This does not distinguish 
 > > stale verdicts after an ID has been released and reused. 
 >  
 > Insane... tons of code added for what?  Batch verdicts are incompatible 
 > with out-of-order verdicts.  I fail to understand why the kernel needs 
 > to become more complex and more complex and more complex. 
 >  
 > LLMs make it oh-so-easy but whats left is even more unmaintanable than 
 > the current state. 
 >  
 > > I would appreciate feedback on: 
 > > 
 > >   - Whether -ERANGE with the queue unchanged is the appropriate response 
 > >     for an ambiguous missing batch boundary. 
 > >   - Whether the per-entry epoch and widened queue counter are appropriate 
 > >     for handling boundaries that have already been removed. 
 >  
 > Sorry, I have no idea what these patches should accomplish. 
 >  
 > >   - Whether the existing drop/FAIL_OPEN policy is the preferred way to 
 > >     handle an incoming packet whose ID is still pending. 
 >  
 > That one is fine, even though I would really like to understand what use 
 > case requires holding on to a packet for 2**32 (!) Ids to pass. 
 > 
Technical Details
Message-ID: <1a1b040da34.2a9c00de770859.6266910270967560587@asgari.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357902-linux-kernel-netdev=dewy.ru
References: <20261106-nfqueue-review-v1-0-b6c933f44943@asgari.net> <au1difVZWMSV78wV@strlen.de>

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-357902-linux-kernel-netdev=dewy.ru
From: alireza@asgari.net (Alireza Asgari)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH RFC net 0/3] netfilter: nfnetlink_queue: handle packet
 ID reuse and large gaps
Date: Fri, 06 Nov 2026 10:46:42 +0100
Organization: Usenet Network
Message-ID: <1a1b040da34.2a9c00de770859.6266910270967560587@asgari.net>
References: <20261106-nfqueue-review-v1-0-b6c933f44943@asgari.net> <au1difVZWMSV78wV@strlen.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3841038"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:dm6RIUV6IYADom21/nxjvKw6qOY= sha256:CiYMBqt02l97/5irbaY62EQP5zGXwPysxui832YVZ94=
	sha1:g387QfcIiRIU6sHOx/QjnrLp6ss= sha256:zPmfGiac2tbwcEhKIQKHKP8VagH8sCgxo2mpr4+mwFU=
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 E1DFA1131E7; Fri,  6 Nov 2026 12:55:26 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.751
X-Spam-Status: No, score=-2.751 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key)
	reason="fail (message has been altered)" header.d=asgari.net
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 CPW1-RzXKjPg;
	Fri,  6 Nov 2026 12:55:24 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-357902-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=asgari.net
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 93FD81131B3; Fri,  6 Nov 2026 12:55:15 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id E44EC2C374; Fri,  6 Nov 2026 09:47:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793958446;
	b=qo/y0nZk6lR574Zl1D3Nx//8FzgB1ADH0saW4GevsbpSedh0ujfgve+4d+kl9tnXDl0Q
	 wc38JdZ/k8gxPkIpSZJRkHbYawo4O4FWlerPwS8NheKRa22vwwQrY67rVDGGeHeN21WZF
	 2k+88JRmkCTGpiINPVzvIdrkQjphCq1LDUPP4kaA/P2XFa6CRHbvz6PoIA52eHWd6RobC
	 msNj5lCTSbyiBK/reXklDUXanRMYh5hhJxbafF7m+yfWU0ERU8YI3Q0or1MhycZb/39Nr
	 QBz6z00xVyaDwwC+TKjZ5k6WPGjcthDRGEkl1WoZ2Wh09AiPVnh6mOJvZIpcsPbLVDg==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793958446;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Message-ID:In-Reply-To:References:Subject:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Transfer-Encoding:Importance:User-Agent:X-Mailer;
	bh=KGWOanORJOsPJiH8nHT2neCvFSKdDJwDjyYcGTPjuQA=;
	b=rJtk2kUaOUztmg+BKLx7I7L+8yNEIuZZiWcdX6p2mKsX76twoHSWs7TuCSGmb7Qkns/+
	 2F/RqIWsOuOSCbyjJU8QKFQhOTNNIhZzRowCxb9SOAM0875GH671kS9zGAb8h9eQ4twU5
	 xGHGzJpdUAzFHiVZ6y0FeLjzpPW4lrM7YZHY6VvR/Cc44/VxcwfQK75pC9Z5N48UknXud
	 budHn81pTIwGbUXln0asRnLFiXsHPIIZFTXCCr3zvAKfhsSjpp0f/j/FS3M9VLlcH2+PN
	 wg/UHpb3s7lX2bH4Tyf7TPCjsZ6GQYmPRwylvH128XhYLzla4T/ft5UbgUxc2lrvuNA==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; 
	dkim=fail reason="signature verification failed" header.d=asgari.net header.i=@asgari.net header.a=rsa-sha256 header.s=zmail header.b=CuC3WrGO;
	dmarc=none header.from=asgari.net;
	spf=pass smtp.mailfrom=asgari.net;
	arc=pass header.oldest-pass=0 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 03DC1606A32F;
	Fri,  6 Nov 2026 09:47:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=asgari.net header.i=@asgari.net header.a=rsa-sha256 header.s=zmail header.b=CuC3WrGO
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=136.143.169.50
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793958435;
	b=LU4/+6NLFZ7Dt/k1j/1Mrj0IfYNtxZywucE1NigF7AwiFXNDkwgtwqm7knZFxeA6nQmu
	 VhJL8YXo7mbKB4looXFlxt2urVaVIsOF2+7Uy0lo4skGgFk7/UFvu+CkH8Bc92Tqd38vq
	 4dhfzkttudjiDTE9J/LtIQ7JjBBmCrChtRsLvneXtouLdOcIdRLArwKtWssqYyQHROUO0
	 VoBR3cX+dgiGVxEnNyD363GBB3JSE2KuqjSNN2+gr/PXCR3ZmK0YihFBGiP7iecA8JJet
	 uR7T76QfLfttQ0pXrHUV5Irx9Bj4YvIXdEso6nhHWJq4TI0yjqDqI6ZvBaDhPxyeA5g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793958435;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Message-ID:
	 In-Reply-To:References:Subject:MIME-Version:Content-Type:
	 Content-Transfer-Encoding:Importance:User-Agent:X-Mailer;
	bh=KGWOanORJOsPJiH8nHT2neCvFSKdDJwDjyYcGTPjuQA=;
	b=PwIbnGUQ567jmNgQZfr/TaIDhPmJ4AsQnjd7nQRosJxg/K4aHlISllO/QZInZ4o0rCoZ
	 S1v7p32z3KCjSTUC1MbBSL972bTLpUbvAik4EhBaVSQaIxE9+P+HHyxTY20Wun7pMUeu5
	 QQEse1b/hIJODZ6IxRAHYSTby7D3chUOlgq1qsd9mDBqkneimadmHcTYEcF43e2SP+miR
	 J9VzVNrvl6qP+QwacoA4cyKq+FhKUnApyCy1x378GRZcIjD0FBWswWbdZriF5/DZSdaZv
	 R5hQsObZlWzzJSzFvsHvTVZDtexnMPg72XLfdAilpz1UkVwY10p7Cezvv4PYuOZkkbw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=asgari.net;
	spf=pass smtp.mailfrom=asgari.net;
	dkim=pass header.d=asgari.net header.i=@asgari.net header.a=rsa-sha256 header.s=zmail header.b=CuC3WrGO;
	arc=pass header.oldest-pass=0 smtp.remote-ip=136.143.169.50
X-Received: from sender-of-o50.zoho.eu (sender-of-o50.zoho.eu [136.143.169.50])
	(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 ESMTPS id D5BD6606A326;
	Fri,  6 Nov 2026 09:47:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D5BD6606A326
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=asgari.net
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=asgari.net
X-ARC-Seal: i=1; a=rsa-sha256; t=1793958403; cv=none; 
	d=zohomail.eu; s=zohoarc; 
	b=C1v6whtdB/SAVNYHEFOVJBXRrHgtOze15gO5BJZdymbpCgXQVzuNAH0IrEmf6jvMIt/OZv26yAuTiKPUMntBLYj7IANmZt2jTslSAYDgCJHJV0pFuUbKZuwGv9pt6zfMpksehseXcIePnnHipKmdX0wY3PNIWA940R+tnkqlHM0=
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; 
	t=1793958403; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; 
	bh=KGWOanORJOsPJiH8nHT2neCvFSKdDJwDjyYcGTPjuQA=; 
	b=VC22+Od9a2ofg9IxBTuATb2WZvpzB+oNKDQZsX/MnJuDjliy17Q8MA6bkdKjl4J0X31Be0lKqaw6j0+g7OSCe6UW8FNvbi/Ny1TpNYj3zC6rlFHlIvsKA8RGD8k5DGrx2QYpg7gkuY64qyP9SpVITrwCe8pCrxIweUoEea5S5AU=
X-ARC-Authentication-Results: i=1; mx.zohomail.eu;
	dkim=pass  header.i=asgari.net;
	spf=pass  smtp.mailfrom=alireza@asgari.net;
	dmarc=pass header.from=<alireza@asgari.net>
X-DKIM-Signature: a=rsa-sha256; b=CuC3WrGOfIrde/sn4FZjliqjZUm0Vxvkut3UPqvc9cFeeYI2Vsxe1oHPLUzcgTw2Xi15FIutVakTOZHJakaGAyyDEZbm7dtbMoJ5BJjvPik2DBBpJWTGNl+HlbqBb/fUEKdYQ1f3bkZMHjfNUjYMwNuGq3ETRyEmuoPWJLcMW/I=; c=relaxed/relaxed; s=zmail; d=asgari.net; v=1; bh=KGWOanORJOsPJiH8nHT2neCvFSKdDJwDjyYcGTPjuQA=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc;
X-Received: from mail.zoho.eu by mx.zoho.eu
	with SMTP id 1793958402628213.30561622537778; Fri, 6 Nov 2026 10:46:42 +0100 (CET)
X-Cc: "Pablo Neira Ayuso" <pablo@netfilter.org>, "Phil Sutter" <phil@nwl.cc>,
	"netfilter-devel" <netfilter-devel@vger.kernel.org>,
	"netdev" <netdev@vger.kernel.org>,
	"kunit-dev" <kunit-dev@googlegroups.com>
X-In-Reply-To: <au1difVZWMSV78wV@strlen.de>
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-Importance: Medium
X-User-Agent: Zoho Mail
X-Mailer: Zoho Mail