From nobody Thu Mar 17 21:38:40 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 84AD51A25B93; Thu, 17 Mar 2022 21:38:41 +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 4KKL9s1S8mz3sMn; Thu, 17 Mar 2022 21:38:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647553121; 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=OhvKKihtLudFdhie7TZc2lP3JXuWvSckqxC129+VfXo=; b=sreJoHY0cf48umhWKS7Lh7Rue3W9lVq14Wnhc50Zh3ceGVQ1JKgUw6z3HYbqyRSH/CC3gY WudEGybrRhYgbFCO7wt+vY7Kx1E4j00ln83s6uEM7V6Vz+ADExcm4YNWjA8GsyfXRDMnx7 0S+GroZm44wXidYtSy5V+b7HqPpd2pdpvCVU6WfJAT9zrSpj65VyhqWrJXnwLVpM+o8W+r cj4qsBBQ1s11DqJ1OUpYSvZ1y2U3TbTXANuRNIibf8tsPUyKQbdARHvU0b62sHCW4Kb4Sl V8BrboRoVFfFkN7tDw9bsPJ7VBA0XOD8vEnNXPZB37UPNebzMxVeZhuaafXsBA== 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 1019D128A8; Thu, 17 Mar 2022 21:38:41 +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 22HLce0O024125; Thu, 17 Mar 2022 21:38:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22HLceu1024124; Thu, 17 Mar 2022 21:38:40 GMT (envelope-from git) Date: Thu, 17 Mar 2022 21:38:40 GMT Message-Id: <202203172138.22HLceu1024124@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: d58d2e403db4 - main - 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/main X-Git-Reftype: branch X-Git-Commit: d58d2e403db48acac7c8459652e9cb19546ab15b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647553121; 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=OhvKKihtLudFdhie7TZc2lP3JXuWvSckqxC129+VfXo=; b=pjWKQDKkWonrqTN+WhAiQwK1G9i1zhQaPIMpDldLjlPRu8UH2kfPuf0MhwI7OG9GKNWugv SuAlyR1ET0a94S4AKQskJPuWzefl+ynjspy9s6r3zPyDMRHA0udN1cTqiSXEEklWD9xXTx kqkXmrzuak8Hu9yD4c/NO4LeFB4KB1iWG6g3dFpdHnaHaoAqJjODsgevZ15p64tOqobHWp w+ZMnFFAnHMVKdMuxZP5yohZI1Hws/KPB8PT5y6issFm71NojkKjtw4iSv4Ytc6x2gQHF7 sjdMe61oAkpCB78zsQ/sNog8mF9Eq9o20miUzY++Y0l+cdhvPFPgHX30qus4MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647553121; a=rsa-sha256; cv=none; b=LLwPi09PSdZxQAABr8m9iP7Nn7zfc3jK/W/Y8Id8XKquwUMi7hCION5KMTD5DJjOcTJfXH JI6Zt4C4E2R9wSxUH6VxCB4ehRh8mUu1ijkd2KQAe4MwPMf2G3QNNNEsP7yTlXASzyj12i OIN/d3gFsWzkRzEBXchWw0yivrtR9YkaKQN2sxwGfzklQ/+ehiChAKxSqYzvy2PxCOpDGj WrujF7ZJWwD9y+KoG0KdyknDTdyvA7pRyUeOjY72Fmp+0lslcutJta4OAMXX3l1K0FN45j 3YppKninyCe4J4ZqDbaf4Xc1C3+ChWl18Sa2lUuhwr0YT2NnSq4BMnKXBxSMyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d58d2e403db48acac7c8459652e9cb19546ab15b commit d58d2e403db48acac7c8459652e9cb19546ab15b Author: Kristof Provost AuthorDate: 2022-03-17 18:49:09 +0000 Commit: Kristof Provost CommitDate: 2022-03-17 21:37:06 +0000 pf tests: Test setting and retrieving nested anchors MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- 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" }