From nobody Thu Oct 30 01:52:21 2025 X-Original-To: dev-commits-src-branches@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 4cxnDR45nlz6DTXg; Thu, 30 Oct 2025 01:52:23 +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 4cxnDQ0n9Nz3pj9; Thu, 30 Oct 2025 01:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761789142; 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=qcVJGCMu2aQrJkJu3/VJHZplbP1BkeCXz6i1335k2Ss=; b=LwSbb8bVGnbFsexobA8INuO3cTefcUTgm+yDNy2t3nbQ2nihHE8RxLo30VOZPvLNMpeqTF Z2c5nos1vnwZOMxs4lKr6eI/T9ULM+HkpSj517jKlLc11WRFbWoeChdT5Ruly9QEg5MBi7 VXxyU5PSj0tjxybWMkzGfx5+VEabYCkpgZ8eBBlZ66KpJUUVL4eW2/h5vVqwRwKA405FMk 2y0xfcbO+wXSGAUpCwnEguu8/9/PgVna2PKg53CrX+q8JvL85xUtsy6wTkKhBwgAFZ38Wl W865kZaofeGAWnehAhphIoaMRzkd5USFatk+uHtlAg8j/jHCk4u02FniQRB3YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761789142; 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=qcVJGCMu2aQrJkJu3/VJHZplbP1BkeCXz6i1335k2Ss=; b=pOBASIukZpXo4atOCEko70HFl1Qe6Nw7LMCCGs2aEJBmQhEoTbaRBnzWRIKDHPlxhY6Hh/ l7Kzrj52eyMxf/MHREMUSEaMWsanBEfDCN1vyQOujUt09OTSHbEtO5IHf2F/XiFbCTTiOx XimUSaKePn5u5TGopwTTrl3d9fYN1cw5+WLy26b79bzX8E6tY27CuzEAJ8DwPpxLSYPq/D ZdR0JuRFOku3QGxj3khgeNxG0Z/Dt5Q7JZMmEW5NHvaCmT8TE4cwbb0RlTK7VWaSb2cUTE +CMQHX6cy2BbkwmqjafrRsvy3HTNo09nMUXtIqHy8fwIDJumpRMPi/P/q1jxlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761789142; a=rsa-sha256; cv=none; b=S9viBo85s66l5clvcrKaeQQ+/lnXsBtKLzakUh8zZnin1nRqF2JuX5xSF73qou/42iplPM 3B/woj3HTCLVfE0LOl9M++wVk2GXmIL0/isayDSTw3FqZMmT6PZjyxMYRhfFOB87+a0gu9 nkU8qpaR0ltPhfkJ6gfPpB9vO9Tb0dttjvo0YgHl0vuCV1OUhPjATVRwSeSYLUUeQXXuQi knm5ooMoLipGIwnMYdrzR6O20lH2ldd6LBQULHcivdStMJYFVeJy0D12jDyPswwzXFY4po Gwvf3P1GgsS5dXX7LzcN0rUHnaTA54PNwXrikyn5vSHovL2uG/7h3/wX9lXZ5A== 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 4cxnDQ0Gymz12R5; Thu, 30 Oct 2025 01:52:22 +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 59U1qL31097575; Thu, 30 Oct 2025 01:52:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59U1qLea097572; Thu, 30 Oct 2025 01:52:21 GMT (envelope-from git) Date: Thu, 30 Oct 2025 01:52:21 GMT Message-Id: <202510300152.59U1qLea097572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: 355ef0c36471 - stable/15 - pfctl: Do not warn if there is no Ethernet anchor List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 355ef0c36471916fd31e6822c3eb62f2fa5f1631 Auto-Submitted: auto-generated The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=355ef0c36471916fd31e6822c3eb62f2fa5f1631 commit 355ef0c36471916fd31e6822c3eb62f2fa5f1631 Author: Jose Luis Duran AuthorDate: 2025-10-26 12:38:00 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-30 01:48:29 +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 (cherry picked from commit 99560fe98c76371d7f0807c2088c78790ca9f943) --- 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 36bdd9705830..48ae54dd2fec 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -3092,10 +3092,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()