Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A04D413785 for ; Mon, 14 Sep 2026 08:44:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789375454; cv=none; b=Z6SkOqWBL7qTyw1Oj+iQt9u1GfY7jkGNhFkYB3gx/zs13AoXhmcop5u49PXO2rVK7RtDpcr1T5c0Dxsr8HmmyYNnhAQJenl/sQKdyaLNx2DDB/tVHidb/KITMipb5/buimef5xwqQL6M6DdO3p2pgN96EAzCh7lrdMWzBSKibP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789375454; c=relaxed/simple; bh=ORHzjd0KShgV+5tLUXmIjWkDdB5AN78qdB4PvCm/mQQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=jRDd/Z7Dg5LW6bnv3H7SiNMK+O//e3yAesyqukTKdElKcu2OjKwWy7uirOWiaEM3Q6ZPOnk1EhgxZu/EVwvyV/YsCS4Nzph1iRMdt3ypba5fHdoxv/Jvisg12PKMMMb7MpLUSKzHYiSIpOnc5dgkwHykPf4I0b2P1iuSI45suNg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc Received: by Chamillionaire.breakpoint.cc (Postfix, from userid 1003) id 3642660456; Mon, 14 Sep 2026 10:44:00 +0200 (CEST) From: Florian Westphal To: Cc: Florian Westphal Subject: [PATCH nft] tests: shell: add packetpath test for timeout policy overrides Date: Mon, 14 Sep 2026 10:33:17 +0200 Message-ID: <20260914083331.19866-1-fw@strlen.de> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Exercise the timeout assigment codepath and check that state disappears after the assigned timeout. Also: - check that non-matching tcp flow is still present - check that udp policy is ignored, even if it lacks 'meta l4proto udp'. - check icmp (which has no policy) doesn't pick up the udp timeout either. Assisted-by: LLM Signed-off-by: Florian Westphal --- .../testcases/packetpath/ct_timeout_policy | 85 ++++++++++++++++ .../dumps/ct_timeout_policy.json-nft | 96 +++++++++++++++++++ .../packetpath/dumps/ct_timeout_policy.nft | 19 ++++ 3 files changed, 200 insertions(+) create mode 100755 tests/shell/testcases/packetpath/ct_timeout_policy create mode 100644 tests/shell/testcases/packetpath/dumps/ct_timeout_policy.json-nft create mode 100644 tests/shell/testcases/packetpath/dumps/ct_timeout_policy.nft diff --git a/tests/shell/testcases/packetpath/ct_timeout_policy b/tests/shell/testcases/packetpath/ct_timeout_policy new file mode 100755 index 000000000000..b153dc9355f3 --- /dev/null +++ b/tests/shell/testcases/packetpath/ct_timeout_policy @@ -0,0 +1,85 @@ +#!/bin/bash +# nftables ct timeout test for tcp. +# Defines ct timeout policies (1s) and verifies they expire for matching flows +# while non matching flow stay alive >2s + +. "$NFT_TEST_LIBRARY_FILE" + +ip link set lo up + +$NFT -f - <