From nobody Wed Sep 10 19:52:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cMWYl06pDz66nNp; Wed, 10 Sep 2025 19:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cMWYk01nrz3tvb; Wed, 10 Sep 2025 19:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757533946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyYxG0mm/nxi3YQsC4E7k8vNJxMM9JhLsJlJd68Zz2k=; b=wUj2oZZbk9KNuRdm+tIoB94l5/aWlQebo9IY6ZOCg1ia5lTpo0nDX6IsY/gyNWEgnT+V8/ ZQUeYKmT7a+YYi1USbshItxAXgTQc4NEs1DLeDdo7xp5fp8JPTpwuUEHkZa49pAXz9QWWA gi8FHvH+8UV0KxMVx2nef59o4AM7j2txMraxMhqj2n3jwRef5PDA3ysDPsFCrz6J1LyGR5 +ujCB2Z63oaGlIhCpqTKhgKj2FJjFeUXtZhjfdzkm61hpnIHK0laudZrgN+QxXtoL23n/k 2i9qH9+kFJhGodDFDBRrtq+MqMg9NYKqaUc4TSVzIuUhza+rYhOybo8N6i7LMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757533946; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LyYxG0mm/nxi3YQsC4E7k8vNJxMM9JhLsJlJd68Zz2k=; b=cCLLg/T9Zy8BE4+ouYOYNaOfYhPCCcUZnHe/v+Nng3B5120AmBiTPyKUuHyjn55Dn3qQpm dZLXUM0yPiyIQqTBE3QxJ89Pn/1PuRbZ1ILQNIU2HqtMt8hGlF57h0FbvWnH0yWVHJhLJy B91N6yW5HEMjXIxnqQ7EITxgyJBrA8c+i1ejErzVRs+dpfn6U91eL5dbM86O90o8Oqgpku NOdIa/qaZm+XBL9NVXelm34kpihNh0d6VDlBuVfR+BiKiJYeJPvTaigGINdRbK5qmo03IX 2CiDiw+Ftuj9NMMvDTYGyf5sUgI40KMO0ag9c7d0PK/rDbWanulDHkG7LZP6yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757533946; a=rsa-sha256; cv=none; b=dCbut+pemQpB6ejLslmKVFPqE4fQOsMAxWZVJhD3fVG9Iwfc9ULrtCntmnvE+k7oQLZdqt 4PSKDJO5WCpLfMHv38m974Am69vf2E7IjwnfNB0XMqu5VaKwUJWNrbab2jwRxVwd4PS7xT 2BFFO4bXmdEWriSZ6yfn4qgYbpjpzf9TbuknoSdJa8wPloCVzxEXwL/Rhg8rNB0VVHx292 XDA2DaZimUYekNPsQRNn5YK2az6EsGqUEoZRgCCtWx5EHeIo2w1eTnqKLoThDPec3iesBQ jI3aptv64WzdrvHolrWOxuzCPBoklUCGnhl5uT+x1w84LUMjTsEMJfhLtOXNtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cMWYj6gnVzcL8; Wed, 10 Sep 2025 19:52:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58AJqPq9095336; Wed, 10 Sep 2025 19:52:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58AJqPoS095333; Wed, 10 Sep 2025 19:52:25 GMT (envelope-from git) Date: Wed, 10 Sep 2025 19:52:25 GMT Message-Id: <202509101952.58AJqPoS095333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d3020caed603 - main - pf tests: recusrive table printing test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d3020caed603e3b1bfb82099557134ccd4c71449 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d3020caed603e3b1bfb82099557134ccd4c71449 commit d3020caed603e3b1bfb82099557134ccd4c71449 Author: Kristof Provost AuthorDate: 2025-08-20 12:42:50 +0000 Commit: Kristof Provost CommitDate: 2025-09-10 19:51:40 +0000 pf tests: recusrive table printing test Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/table.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index 65492545a13b..26fc5bf6cda2 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -673,6 +673,43 @@ large_cleanup() pft_cleanup } +atf_test_case "show_recursive" "cleanup" +show_recursive_head() +{ + atf_set descr 'Test displaying tables in every anchor' + atf_set require.user root +} + +show_recursive_body() +{ + pft_init + + vnet_mkjail alcatraz + + pft_set_rules alcatraz \ + + (echo "table persist" + echo "block in quick from to any" + ) | jexec alcatraz pfctl -a anchorage -f - + + pft_set_rules noflush alcatraz \ + "table counters { 192.0.2.1 }" \ + "pass in from " \ + "anchor anchorage" + + jexec alcatraz pfctl -sr -a "*" + + atf_check -s exit:0 -e ignore -o match:'-pa-r-- bar@anchorage' \ + jexec alcatraz pfctl -v -a "*" -sT + atf_check -s exit:0 -e ignore -o match:'--a-r-C foo' \ + jexec alcatraz pfctl -v -a "*" -sT +} + +show_recursive_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4_counters" @@ -689,4 +726,5 @@ atf_init_test_cases() atf_add_test_case "anchor" atf_add_test_case "flush" atf_add_test_case "large" + atf_add_test_case "show_recursive" }