From nobody Thu Mar 24 13:14:39 2022 X-Original-To: dev-commits-src-branches@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 16C271A38CF2; Thu, 24 Mar 2022 13:14:40 +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 4KPQg34z2zz3MgM; Thu, 24 Mar 2022 13:14:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648127679; 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=h73d8zvs7Tdl5oNj6yBBavHgiVo1yceyNmqp16cQt2A=; b=aVSu8D81aRHtoLN1fX1WCnW+Kj0TyR/8tzBexR0S4r74MSAZDmFKmQoqqlqPmPJg1xZJ8d HhCvJNBnekUdNbNQuNU5kwQ+nobZBh6W/oEDmGYabipP+kBKF0FRLHOWKPEKnmkE0VhFV+ TeID2pBBt6FbBHUrv0LtpxhKXrvLwXqcU3dA3LzHehiotfcbW9lSdnJ/qeXy7SQc0Q/oME klSNqV7d9d/kFo4aoOGrCHqOWLhFaO0uNYYWTdMWcUjy0e1gzT2qxpSlmdHxrIQdAGuV+C Z0eid6a1Nygb299GgezAUf2TU4OHTXO6UJwjhNpsYR7u8uknfTpzwaBJlFXe2A== 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 43C5F1890D; Thu, 24 Mar 2022 13:14:39 +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 22ODEdEb032050; Thu, 24 Mar 2022 13:14:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22ODEd4t032049; Thu, 24 Mar 2022 13:14:39 GMT (envelope-from git) Date: Thu, 24 Mar 2022 13:14:39 GMT Message-Id: <202203241314.22ODEd4t032049@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: 5aaceccdb23b - stable/12 - pf tests: Test setting and retrieving nested anchors List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/12 X-Git-Reftype: branch X-Git-Commit: 5aaceccdb23b35588133ee329c08bc3e518aafb7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648127679; 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=h73d8zvs7Tdl5oNj6yBBavHgiVo1yceyNmqp16cQt2A=; b=VvFvQ5VWH+JxYd+H6YiH9AEr6QJLcrx7fzCXCEwIIRSpyX3uhDYNoQZf7cdkUxM3VLpbOM 5ENDStnTOKQsqcUTqv+9j+GKBWLLhkQADyQWDVKYnXC3G/yM620B7CQZdVml0JWZsvQe+C sWQy2D3PQWewmOqcx08W5vgB91i00KRiyRfQ5fzRnj1R+2PjMDfh411+rYTeYBoYWqZZ7x zdNxtdXPxIs2kLvqDrRWZalGDIDkLccvjxj248JQnRK52c2871GqAY+wO2btpmNwv80drF ln19jXf/y+17xlaB4jK9Pl5RPAta/IBzwjLZwGDQpdAzkX9X6Tc+QwD736bL2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648127679; a=rsa-sha256; cv=none; b=AQGrxz+KlqkKGYA0gVixBV65Dv2dgdRvZRUJCgMccNs1spLM4XcBnIXanKME/ZP3huIgEt 5MiAlAqEOU0AHyEUKCpfMV6V4Lq0GdUCgRuBNbkVegKHuEmZWccZnkkHw+SucbuO1eDoOg RiQwg7nJwh7ZzffTXz5KmCMs22R8Vov7DytKyskHWcpKMi05wVt0mf4JKpI2Ig6HmMn4aZ mJb4F95Zwl/Dui5aVNkal054u9NSJkIT/bQFe5DIv2VClrjJFoZw+okc9p0XonzMn0coy+ PuCzl+gq1GdBhgxV3iTB+V7od2Z7W7gdlSBZRv5gp3Jlry9MyuV3bFY0neuZyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5aaceccdb23b35588133ee329c08bc3e518aafb7 commit 5aaceccdb23b35588133ee329c08bc3e518aafb7 Author: Kristof Provost AuthorDate: 2022-03-17 18:49:09 +0000 Commit: Kristof Provost CommitDate: 2022-03-24 09:44:41 +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 100755 --- 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" }