From nobody Mon Nov 27 20:38:06 2023 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 4SfHTq0PTJz52lsR; Mon, 27 Nov 2023 20:38:07 +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 4SfHTp6hsRz4LCZ; Mon, 27 Nov 2023 20:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701117486; 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=zBbNIN/3gTaKbY6lYKS6cGW4IocVbxbEmonX2KPPApA=; b=Xy0td5BYFDXOqP50cULcSuo4w26KU8qCq2xwzBXcOQZotW2Du8iRMWIljI3kVQNN+/V4Qi odXlkM1zK6Yd0HKuxxhnJY7M4p0jR3//XjVKSfdeWC9ni9j4VshrC6THvEF3VJh5EhZj8t EgassvwCFASzD0HnxivlCOh+UIIxHZIuEaBtQw/YJkmPliikgGBWn05yTZEhpwfkeFj0cF xXVdIxaHtWQoMVklKG5k2e54Dis31E4Sawe3x/l9JPeytLXJqJR0QpKA6P9mqU/UPJn/yF Ztudko10Mfnnlg8gttPr53pJDcKX4rf4UdRKRMRqTTQT7QJE6YVZCoJlIzXAzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701117486; 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=zBbNIN/3gTaKbY6lYKS6cGW4IocVbxbEmonX2KPPApA=; b=WnbfTQHFlvKPk8HC251Se4FMv+vmcjcJgx4bueYIdUH1PjGiXK8b5Cl4CcOKQp9SYERIC9 Y2Ncc18K0+/W4IGX8i94CLJy6MtSxp+YfWuSjiSQOWfIvTKR5tOjMB3scIOv/ixEYLeRLr qN6/ckuj6BclnT6S1x4JmaLCAAzewk/0okoSdBqLinxTJMuAbVXvGIvmgmBNch6q5IX2EZ iJ2yHqthqq5JxOdFJRVSwZqESBe3jAP4xixPponJiBAXURMxwpNd5alkEoMFDUpdQq7AWa 9J0Rkr2uAyzkm9rdjdbelyVEF1Dxek1gCcS5w3JRLsTjeNAIvTuUSAwLNupQ+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701117486; a=rsa-sha256; cv=none; b=dP/huGzxYmetJKmo90QDl4bQd9ZkmJZaUsAt3/Tdp30+YNuQspNovwDnC2lD7Nz2tQ0DVu lGGBkUpYdujQfhUwz4klCItQ9K+d/Pc58dFXpwK9547Az5Gb+y3xKBF7WTU8LuXvpjRqTb t2Di69eXuDjvJ/b1mOuYmGy/Qk1jvP5qzHDjEOhSn6rjnNc0Ojn3Anurl1Ay8S+J6ymuO+ khDq+pZQpnPMBd79WqH4iDBEwafoe18Y8XEAR9qgXuWn2HXCUGGyDkuKaBHgJTkxSr1YIz XXLbnON4FhL/a6WoslKYKJD62HiwJl7DV1hCopzuHPEDt/0IhpIHG51VkPRUxA== 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 4SfHTp589KztHm; Mon, 27 Nov 2023 20:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ARKc61A020111; Mon, 27 Nov 2023 20:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ARKc6sG020108; Mon, 27 Nov 2023 20:38:06 GMT (envelope-from git) Date: Mon, 27 Nov 2023 20:38:06 GMT Message-Id: <202311272038.3ARKc6sG020108@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: 1d723c1e565e - main - pf tests: test recursive printing of labels 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: 1d723c1e565e714e4192883d813ef81e97220f27 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d723c1e565e714e4192883d813ef81e97220f27 commit 1d723c1e565e714e4192883d813ef81e97220f27 Author: Kristof Provost AuthorDate: 2023-11-27 15:47:36 +0000 Commit: Kristof Provost CommitDate: 2023-11-27 20:37:33 +0000 pf tests: test recursive printing of labels 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 cf6da8740003..b1faa5f6c57e 100644 --- a/tests/sys/netpfil/pf/anchor.sh +++ b/tests/sys/netpfil/pf/anchor.sh @@ -130,9 +130,44 @@ wildcard_cleanup() pft_cleanup } +atf_test_case "nested_label" "cleanup" +nested_label_head() +{ + atf_set descr "Test recursive listing of labels" + atf_set require.user root +} + +nested_label_body() +{ + pft_init + + vnet_mkjail alcatraz + + pft_set_rules alcatraz \ + "anchor \"foo\" { \n\ + pass in quick proto icmp label \"passicmp\"\n\ + anchor \"bar\" { \n\ + pass in proto tcp label \"passtcp\"\n\ + } \n\ + }" \ + "pass quick from any to any label \"anytoany\"" + + atf_check -s exit:0 \ + -o inline:"passicmp 0 0 0 0 0 0 0 0 +passtcp 0 0 0 0 0 0 0 0 +anytoany 0 0 0 0 0 0 0 0 +" jexec alcatraz pfctl -sl -a* +} + +nested_label_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "pr183198" atf_add_test_case "nested_anchor" atf_add_test_case "wildcard" + atf_add_test_case "nested_label" }