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 - <