From nobody Tue Oct 28 11:49:25 2025 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 4cwpZF5JZpz6DlZP; Tue, 28 Oct 2025 11:49:25 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cwpZF4DcMz3Sb0; Tue, 28 Oct 2025 11:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761652165; 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=1H6jKowRhd/KY29lZ9Me/ftstV/dddCjb1/VuY5jCyM=; b=PxOYFNKJHzQZtEOcaO1Khkxe8vkeXEkUAoXLS+mTOqmHxWYZVddRK5g2LWsQsJxF3o+sQ6 8WyOGvfHUUrAswZyt8deBx5Kkor+NgxViNBPjoZSGfo8v5jHlZv7S3txvOYJGQURf/hEWX wpBkUY0k0A1oUu1gjfcUYp5waQ8NzkT2wlIHYn7WE4gOrYfT/zxbdYC1y1Ab8lXmrWE1ex FLc4KKVIVfuOb7hYlTsGpkGr1L5bHhSqZmvdBmDyklAHEQd9LCXEWGm36T/3jv7vMi0zDd 5A6yLBvt988KDMGF9HLAgrePN1LFdWLXp2W0XNKaF/iFdB2wVlLrq2UWPOKHlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761652165; 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=1H6jKowRhd/KY29lZ9Me/ftstV/dddCjb1/VuY5jCyM=; b=EYCAbx0L6/BLnJpbTJBPBBWIJidnatkxYacAV4g1pr+Cb8LT+bD1nTOGapj22al8dis/L/ XGqFzbWH5jTJcwLEnxvWsBqUkNCDvqcSQcTyph1dgE/2Qxu+7QYYv9SC9sD8o6QzFgXCqH H7pHgICDDzaBqlP+0mj9Kw4MAhmTxGAYbKJkoxlPvW4tYp7cP9XAzLyDQ/HkCNiGk2x0kJ NUiljACYIbEiT4D9PLgnVFMk6B4+31T/ydEtEhSJpAxI6SiadYjAY+NjzBRnPMRL/dYUae u4QkoeggBU+Ww2qhURplFGCgOQ+bAPPRSz3QHSHVXKkHYVIQgzaKWH189QiKfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761652165; a=rsa-sha256; cv=none; b=eKl2Q6H/xq5rdxwKztwjVdCN7pqtYTniNdvHeyjjaJQh77g3vkl1+HKxxhVKUaYShyBPO+ TZcRKOGHln+rRTaBlgDjlx/q0M513qJ5wuyLQliHJnaEi5DBj2KOELhwrD/QGYGeZGu3qS nPGLGEC3BDbEEflPcUOnx8uOnQzmPfreTwz2N57zb5WzcJ9rdik+0KBHJglh6zj0xowaUT iewBHImV7K9RyvOstLI5TXCRo7vRkK/R51GXBy/NAyXD2NXYitDBos4ha3bzPxmyHlIMRk qKkV5mQQS9UpYNqDXqdCQiGsDspf5pcvCDkMtzxxuBv5jIJ6MNtKUWiUggSCKA== 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 4cwpZF3fb8zpPP; Tue, 28 Oct 2025 11:49:25 +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 59SBnPLF083387; Tue, 28 Oct 2025 11:49:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59SBnPgX083384; Tue, 28 Oct 2025 11:49:25 GMT (envelope-from git) Date: Tue, 28 Oct 2025 11:49:25 GMT Message-Id: <202510281149.59SBnPgX083384@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 99560fe98c76 - main - pfctl: Do not warn if there is no Ethernet anchor 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99560fe98c76371d7f0807c2088c78790ca9f943 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=99560fe98c76371d7f0807c2088c78790ca9f943 commit 99560fe98c76371d7f0807c2088c78790ca9f943 Author: Jose Luis Duran AuthorDate: 2025-10-26 12:38:00 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-28 11:31:20 +0000 pfctl: Do not warn if there is no Ethernet anchor Avoid emitting a warning if there is no Ethernet anchor. If the anchor --regardless of its type-- is nonexistent, should be caught earlier. This can be misleading when there is a layer 3 anchor but not an Ethernet anchor, giving the user the impression that there is no layer 3 anchor with that name. PR: 280516 Approved by: kp MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D53360 --- sbin/pfctl/pfctl.c | 5 +---- tests/sys/netpfil/pf/anchor.sh | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index ed317495c2e0..3d2632c1cf74 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -3167,10 +3167,7 @@ pfctl_show_eth_anchors(int dev, int opts, char *anchorname) int ret; if ((ret = pfctl_get_eth_rulesets_info(dev, &ri, anchorname)) != 0) { - if (ret == ENOENT) - fprintf(stderr, "Anchor '%s' not found.\n", - anchorname); - else + if (ret != ENOENT) errc(1, ret, "DIOCGETETHRULESETS"); return (-1); } diff --git a/tests/sys/netpfil/pf/anchor.sh b/tests/sys/netpfil/pf/anchor.sh index 034fe0d3d574..f321c742788e 100644 --- a/tests/sys/netpfil/pf/anchor.sh +++ b/tests/sys/netpfil/pf/anchor.sh @@ -157,10 +157,10 @@ deeply_nested_body() atf_check -s exit:0 -o \ inline:" foo\n foo/bar\n foo/bar/foobar\n foo/bar/quux\n foo/baz\n foo/qux\n" \ - -e ignore jexec alcatraz pfctl -sA + jexec alcatraz pfctl -sA atf_check -s exit:0 -o inline:" foo/bar/foobar\n foo/bar/quux\n" \ - -e ignore jexec alcatraz pfctl -a foo/bar -sA + jexec alcatraz pfctl -a foo/bar -sA } deeply_nested_cleanup()