From nobody Thu Mar 24 13:15:51 2022 X-Original-To: dev-commits-src-all@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 3D2281A39C7A; Thu, 24 Mar 2022 13:15:52 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KPQhR74mdz3NN7; Thu, 24 Mar 2022 13:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648127752; 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=y7rzfxw1V+4ODK/3LMMWvIKaBiHZNYGbEyAhTVKQ0+w=; b=V+kBszjNhMNO9Wn/ZPTe41nbBMwV8XjjEsYyxMOkHQd1Povv58TG+uym8bHdxLcxrARMam UOqMCNZfKKNNFuN7IvvfUFgxkK4bvyzMYYV/pKYyh1TRGacmtmmuQ24xngZDS9LW4pb2yJ EEZb+aUfW7Xmdrwy1x1fiExnAna4xVJ1G690bEgfatfEXjTeLiFxoATj5G/BlUWEKJofSD +FmORbMFcaPEyiclNnEpOSRqMrEiwgfws4UvS9ZFHynQPJgKiF+dJXLIOsdrixKat8g7pV 0aSNqfkusSnoKOFVP7TritWwZkYCZF4VtDVtm7Mvd4CsKkwIrf5BNlKC8e56Eg== 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 B861418835; Thu, 24 Mar 2022 13:15:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22ODFptw032362; Thu, 24 Mar 2022 13:15:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22ODFp0D032361; Thu, 24 Mar 2022 13:15:51 GMT (envelope-from git) Date: Thu, 24 Mar 2022 13:15:51 GMT Message-Id: <202203241315.22ODFp0D032361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 146681af729c - stable/13 - pf tests: Test setting and retrieving nested anchors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 146681af729c09c1edac3acdcdf7a8b7a0a4fad9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648127752; 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=y7rzfxw1V+4ODK/3LMMWvIKaBiHZNYGbEyAhTVKQ0+w=; b=Lx/7zb5L3eHy7u1gYJesD4jmJ+tt4VpaiQQ2vyihFuzW1M3yk1kO6WK7R+9ssIyZeZOMTO 9cni/+hvSOXKgk4hc5zWox0VFrw/Jx3SyDxxsS2drHomv9pfxjQE/s4GRdcn0Wx4VAJvsX nQ2jm3t944IU91tZ/gdqHc4ah+gM7h8iFPeGzJ6cJqw+Z4rY2X4zUxj7GwYzN2y3h0rWOj kAtZRtrCoSP2hBfUmLUQza8ALrfqgHaqu+9I9NmxSukpvUCUSC6VunUFXb0SVUUPDIVSfw kvL8hjemGJz0EFEXKBNRVthO2QZnXMU4+zEf3XZdpDmyKWSusw5lotUL4V8b9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648127752; a=rsa-sha256; cv=none; b=neSxeE+u9Ddajm/hgpO+c/EIJAwQKxKmdnuTpSaGs2Jl6i/pbd0RbKmQuI07OfAUqINa8Q iZnc7EHdZrgA8XH5ySi8jrpkWNHTb2GzlByL+WJBQbZNsQXdtyUdQ0HEAb8rDndl9RpVCN fhPlg7jBcy6AOXJ4brcJeYHKp+uAh46NXpmfUsokTt25h3aLfFXH0yu7GJNdF+mYxb0uaT TrNWf9os6qDivFpB6TSwbbvSXTnFELXBI+X0/iYRFiBbkmGbplcJ7n47lfJvUUPS1L54eo VjkzpRO4d1Es53hf1E0fjJqMSYfkAmibiZCdmQuWSul7ik8SsT24rxni6NO5Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=146681af729c09c1edac3acdcdf7a8b7a0a4fad9 commit 146681af729c09c1edac3acdcdf7a8b7a0a4fad9 Author: Kristof Provost AuthorDate: 2022-03-17 18:49:09 +0000 Commit: Kristof Provost CommitDate: 2022-03-24 09:44:40 +0000 pf tests: Test setting and retrieving nested anchors MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit d58d2e403db48acac7c8459652e9cb19546ab15b) --- tests/sys/netpfil/pf/anchor.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tests/sys/netpfil/pf/anchor.sh b/tests/sys/netpfil/pf/anchor.sh index 7427c07dd17b..4fd3697155d9 100644 --- a/tests/sys/netpfil/pf/anchor.sh +++ b/tests/sys/netpfil/pf/anchor.sh @@ -59,7 +59,42 @@ pr183198_cleanup() pft_cleanup } +atf_test_case "nested_anchor" "cleanup" +nested_anchor_head() +{ + atf_set descr 'Test setting and retrieving nested anchors' + atf_set require.user root +} + +nested_anchor_body() +{ + pft_init + + epair=$(vnet_mkepair) + vnet_mkjail alcatraz ${epair}a + + pft_set_rules alcatraz \ + "anchor \"foo\" { \n\ + anchor \"bar\" { \n\ + pass on ${epair}a \n\ + } \n\ + }" + + atf_check -s exit:0 -o inline:"anchor \"foo\" all { + anchor \"bar\" all { + pass on ${epair}a all flags S/SA keep state + } +} +" jexec alcatraz pfctl -sr -a "*" +} + +nested_anchor_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "pr183198" + atf_add_test_case "nested_anchor" }