From nobody Fri Feb 14 17:50:29 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 4Yvfj14jH1z5nQx3; Fri, 14 Feb 2025 17:50:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yvfj12RrWz3KMg; Fri, 14 Feb 2025 17:50:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739555429; 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=1RvQhJhb+Ympa1ckWG2mNNBJiAHCjnqP+DgKX62l6dQ=; b=og55PC3f7cYdInzFPJcDl5WGT2KKRoqqXq+S/QXXvQYU/QN2mMe0nSzCIgZ/8KAJWySptl nMToKdO7f7dJUA/ZaEJOSUqDMYhg4va3e2I/RZr1wT8u4e+prkqXUQuY5N/vBZVnQn420T milYa2KGO9BBeujV3NQuv3DjpaMg9p9BlyX758JMOkK6zdwgjwknTgTxATCxWMByYgzYc9 fcX2+a8cBrwf3gvgIHJEMMweQo+tD5kWVjDWgz75vnh/3eTkCgpcQjmeKts+QLsHoK8SRi 9aYp29kdC0wHAbjf8owE0NFXmn2dXvu/+sgInsvNaWt71M56V+QemkE9SbQdlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739555429; 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=1RvQhJhb+Ympa1ckWG2mNNBJiAHCjnqP+DgKX62l6dQ=; b=KrOEF27DM/Vb0mRSd1pTNNm5GWAvhMXLJKg+XnyWZBUxhhryEdklpUY1iLyY+QMBsGBXDZ zxctbqOFsQSXmyB40AI/KYb8n3QfRIijdqg3M8qQuiOLhorYqrr3FtNgE/ABRd3JCrmA0u 21fBK5yL8/VhqvjNXj85UGxx8lV+I2P1Gkg+goSK9MkeX3ncl13YXFxmOtBIQ6Shmja+L6 GoG2t4oDskH1FGg2nZOL8ZU5cEQHZRQ+rObS581kMnUFDqM5SlWDyLrspXjezf4Puxrwj/ NpkbM86U1R1H2G7yP7McGQmcyjufoz/8r0wsxxvzu1ZfUsiWXw927VMrjJixKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739555429; a=rsa-sha256; cv=none; b=DOeXDBqfgwc06KoE2oZvU2DuvYswLN/wJgRF54bCkFwAyprvlYRtFZthZuJKpMba+3lem9 WUbtKHjy8I7bGlqwUUSHhryG4+3BUgqnCZ8+3Cz/edswEs7R0CYN+nV16onYsydL0Vn8yp 9ArFALOhhQ+HOEPfS+eF6Tod6WvQ4VjyqJN/L97JnzDeYmUYRyLp8PQqz4qnXGh5jGYHsS aqrIqFFNrEnRA3AnvQi+LH6nopv4kjU1nn9xFkdT1dlY/a3yNDlT0HP84QaE+aZmJtzpoo iH8ZF23bxpCzF0iFw+D9/MtsFmqbAg6rvpf407CcqY2YJi1A/9beyJP8el78dw== 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 4Yvfj1231zzh4p; Fri, 14 Feb 2025 17:50:29 +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 51EHoTV1061487; Fri, 14 Feb 2025 17:50:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51EHoTE2061484; Fri, 14 Feb 2025 17:50:29 GMT (envelope-from git) Date: Fri, 14 Feb 2025 17:50:29 GMT Message-Id: <202502141750.51EHoTE2061484@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: 26a7be91ad69 - main - pf tests: basic 'any' interface test case 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: 26a7be91ad693cacaa28ead4b655d88d0ee2ae1a Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=26a7be91ad693cacaa28ead4b655d88d0ee2ae1a commit 26a7be91ad693cacaa28ead4b655d88d0ee2ae1a Author: Kristof Provost AuthorDate: 2025-02-11 10:25:24 +0000 Commit: Kristof Provost CommitDate: 2025-02-14 17:47:53 +0000 pf tests: basic 'any' interface test case Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/pass_block.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/sys/netpfil/pf/pass_block.sh b/tests/sys/netpfil/pf/pass_block.sh index d5ff37b6c167..b8ad5a86b102 100644 --- a/tests/sys/netpfil/pf/pass_block.sh +++ b/tests/sys/netpfil/pf/pass_block.sh @@ -418,6 +418,39 @@ optimize_any_cleanup() pft_cleanup } +atf_test_case "any_if" "cleanup" +any_if_head() +{ + atf_set descr 'Test the any interface keyword' + atf_set require.user root +} + +any_if_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}b 192.0.2.2/24 up + + vnet_mkjail alcatraz ${epair}a + jexec alcatraz ifconfig ${epair}a 192.0.2.1/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "block" \ + "pass in on any" + + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 +} + +any_if_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "enable_disable" @@ -428,4 +461,5 @@ atf_init_test_cases() atf_add_test_case "urpf" atf_add_test_case "received_on" atf_add_test_case "optimize_any" + atf_add_test_case "any_if" }