From nobody Fri Sep 25 15:45:54 2026 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 4hrw5w4fvqz6tYt2 for ; Fri, 25 Sep 2026 15:45:56 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hrw5w44H5z4JZN for ; Fri, 25 Sep 2026 15:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790351156; 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=3/SyeMId+oamrL6HnAU4C67AGpv5C24ew6tKFjUC7ow=; b=Q5vfdDcBDFEp3CbvDBK9cOEdfGSZB/kdAz75Rd7d5LZzdyVM4iLOFeFLGSxTmkJgXOXkJv rhXuFuJu68DUwwf82MYl4Ag7Y+rTAo0AI96I7XTsvyBIAvNqfRNRncu9RWF/vP/f1fjHTk 9bvtuK3ApAfpudqz27sMsWAv4K2hnM7SI6dSC/aNWMj8Sv8EtOiCiMpxMQc4p5ZN10Qi1P aE2ami3+ZV0au32pYOpAd/rc3vFOSgGupgchs7zE0msjlnNnafuct2wQJxj+mad84L8sEP 3bWOySqyp0UDvgIbiqPSLsibSxTNoNANrapOjHUk8sqhU/dLCAapyZlwccHDUA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790351156; b=hbJNoUf/+Ftpa56QyTeGNP512ME1RdEmr1S6imenVhFgmJT9pC45VNo7hC3/qg0xl+n6Wb VAqTQj7G4Tu6cDiGZqMa3Pdln63o7R1YXW0lp+iwedaonCvotlK2QYTVcxSTunIpB6vNcu 0d9tfPvUmMUp84ujwu65hEmUtihcWx5XhAfPBZVirBDjjN7Marb+vmcxmV2D8VYmxdFwc1 hagFwFYvD/IeOxYy7comAjXVQCwo5S9N+liBFxaLsrIwzLq30FaVMgZK6pJ3nDofPGDDbz fpmGjxblse4TgN6QHM2qssGqrYkRW02tn3oEv/Yzh9UR7VxwPaDFGKzr7C/2OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790351156; 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=3/SyeMId+oamrL6HnAU4C67AGpv5C24ew6tKFjUC7ow=; b=E2PLHWdHiLH+vasltgN1NNY8i2ku+T3mcSGTL1o2YEM7Rf1xQyW11WsDHBNCrTz0GdYD3j t7mIRH8P64w896fwiXUI4FBDrzfIMy3DW+JFFxXZlSPQM5XNe/CqJV0R2acRafH/fh3ngs HCCsjbnRbZnGV1g09JSeCmU0hBZdy/k5eMZzoGkitaaVes3lXW6jQR0PfE9IKk+qIl7V6N mRIqTKxWkJejgfkn8j6Zc1Ak+hEtXch4xdzUDgpjxm2bRBnhuI7GhCYtkvo2B3Wgzepbyl cK5ExwMZNKg2DfAK0zHvYTASaqHlM+EhM7OO89m1jprUPS47VXNVEvhBUG8pOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hrw5t72DlzGC7 for ; Fri, 25 Sep 2026 15:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43a18 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 25 Sep 2026 15:45:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 3c0846bd9c3d - main - pf tests: basic osfp test 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 3c0846bd9c3dfbe82377f90ef8ef1ef26e746fb9 Auto-Submitted: auto-generated Date: Fri, 25 Sep 2026 15:45:54 +0000 Message-Id: <6ab69732.43a18.64b56982@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3c0846bd9c3dfbe82377f90ef8ef1ef26e746fb9 commit 3c0846bd9c3dfbe82377f90ef8ef1ef26e746fb9 Author: Kristof Provost AuthorDate: 2026-09-24 14:31:41 +0000 Commit: Kristof Provost CommitDate: 2026-09-25 15:45:43 +0000 pf tests: basic osfp test Load, list and clear the fingerprints. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/osfp.sh | 63 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 7b2e32c09543..c95bac83c92c 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -33,6 +33,7 @@ ATF_TESTS_SH+= altq \ nat \ nat64 \ once \ + osfp \ pass_block \ pflog \ pflow \ diff --git a/tests/sys/netpfil/pf/osfp.sh b/tests/sys/netpfil/pf/osfp.sh new file mode 100644 index 000000000000..9f0fb3713f3c --- /dev/null +++ b/tests/sys/netpfil/pf/osfp.sh @@ -0,0 +1,63 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2026 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "load_clear" "cleanup" +load_clear_head() +{ + atf_set descr 'Test loading and clearing the OS fingerprint database' + atf_set require.user root +} + +load_clear_body() +{ + pft_init + + vnet_mkjail alcatraz + + pft_set_rules alcatraz \ + "set fingerprints \"/etc/pf.os\"" + + atf_check -s exit:0 -o match:".*FreeBSD.*" \ + jexec alcatraz pfctl -sosfp + + atf_check -s exit:0 \ + jexec alcatraz pfctl -Fosfp + + atf_check -s exit:0 -o not-match:".*FreeBSD.*" \ + jexec alcatraz pfctl -sosfp +} + +load_clear_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "load_clear" +}