From nobody Mon Jul 7 15:07:54 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 4bbSKR1pZwz61w7Z; Mon, 07 Jul 2025 15:07:55 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bbSKQ6Cfxz3wC0; Mon, 07 Jul 2025 15:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751900874; 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=gzXcuzRfhbhH9BvcIguQeGCVK+LnOPgNZbKSA/rCJ5A=; b=B3Qk0c7FhVuYZRVtrTA1WycrrmGCt1FBR3Exz+fbCm6dCM6CKGZONQVNKBhy1wfwDJLq8B rKITrqsU784l04d2lCu31qnRgaJIa5U6M8SBMXMW2MUjKXbSq/YGO+aeHFaZTOgTT+XfSF ehPbwORMMRUKrVIcwWv409TrJ6nxKY7VidiuqcqjV/5jqWloS2bscHj/CRraRS4vQg8Jo4 IxmpTDdCv3C0+fHHwT9vau4bWeM/O4KVqNbpOWsUPxVCbkuT92StNx7c137TKhGuTK777Y /RVQh/OkZwvHU3VqKzy9seuH5n3UeY77/ESeEsct/aCfzhvVGdix8/p2Vg5tiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751900874; 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=gzXcuzRfhbhH9BvcIguQeGCVK+LnOPgNZbKSA/rCJ5A=; b=b+fopA34VGv1Rr6e6Bo92cG8RuB7NlNmvDROjuYqUPWYxGt8zGryry+Y/hczylFBVk4b0X FFBf3Fqr20wpM6P6GL26vHh2VJRJBha+xvfQIDLmOO4H9Yxd4oelfDgHy9muaCIcUorWo3 FRD5c+AQ+BfkQKfgEE5gYNZU+NdMRn5ydh/2RKCKhxxsKa06cAWarbmfGs/r2Q+R59wLWe 96Iraq/09NIPQeWyvqz5whH6sK21cMixIqO7QeC5hDYbeJ6KNzvkj2t41oWc6EpLtA5JNy 3ve4UIMpHoSKZAvfdiPNKEiumIEQbezNz2O0YhcCyP59PlWwthz3eeBf/EVekQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751900874; a=rsa-sha256; cv=none; b=emKVlQRJlkKCLQ5TbE4reME0lcpXj2KKGtwkzfFkBAHqFtx0ZUmJXa3nh3X1dYn/01H38k c0tBkB9NJtoLFdd9bDNPzZQbtWLL3PvY4UhHGQv9L0HvcZVFmG/SBDk4QT9dACBeO0Kq92 //FJCfV819SJZcwQNMqfAN9/gd/anmVcR5mIjEK45StNS+wjupZeLM4VE9WFzmml83F3Ha y3onM3ROKWlvpZzE2XWFyZi0pkbd3ZyhRuO0Bz8upzE9y9jaBNtTiCRAd6Aom2xHy6V8me Qq9wKaFBulWV1VFlZpP8h97RN5cmVueXy4hwrJ30kd7LN1Flh4YUjH2dAxbs0w== 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 4bbSKQ5q2YzvGV; Mon, 07 Jul 2025 15:07:54 +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 567F7s5R016586; Mon, 7 Jul 2025 15:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 567F7s2f016583; Mon, 7 Jul 2025 15:07:54 GMT (envelope-from git) Date: Mon, 7 Jul 2025 15:07:54 GMT Message-Id: <202507071507.567F7s2f016583@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: 9d74a1b5d6cf - main - pfctl: Make -N and -r mutually exclusive 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: 9d74a1b5d6cfde02d27786c59ccafafdf6d6fe63 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9d74a1b5d6cfde02d27786c59ccafafdf6d6fe63 commit 9d74a1b5d6cfde02d27786c59ccafafdf6d6fe63 Author: Kristof Provost AuthorDate: 2025-07-02 09:43:43 +0000 Commit: Kristof Provost CommitDate: 2025-07-07 15:06:49 +0000 pfctl: Make -N and -r mutually exclusive Either disable DNS or enable additional reverse lookups, but not both. OK benno Obtained from: OpenBSD, kn , b294e41e93 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pfctl.8 | 6 +++++- sbin/pfctl/pfctl.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl.8 b/sbin/pfctl/pfctl.8 index 85294dda949f..0c4a7b519bf6 100644 --- a/sbin/pfctl/pfctl.8 +++ b/sbin/pfctl/pfctl.8 @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 1, 2025 +.Dd July 2, 2025 .Dt PFCTL 8 .Os .Sh NAME @@ -402,6 +402,10 @@ Load only the filter rules present in the rule file. Other rules and options are ignored. .It Fl r Perform reverse DNS lookups on states and tables when displaying them. +.Fl N +and +.Fl r +are mutually exclusive. .It Fl s Ar modifier Show the filter parameters specified by .Ar modifier diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 10183084ceec..d3614f5f7c59 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -3156,6 +3156,9 @@ main(int argc, char *argv[]) } } + if ((opts & PF_OPT_NODNS) && (opts & PF_OPT_USEDNS)) + errx(1, "-N and -r are mutually exclusive"); + if (tblcmdopt == NULL ^ tableopt == NULL) usage();