From nobody Sun May 26 23:27:04 2024 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 4VnZgD6rkzz5M3mP; Sun, 26 May 2024 23:27:04 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VnZgD6Mntz4ZCv; Sun, 26 May 2024 23:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716766024; 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=E1FfMp8906veaC+Fmj/KtU787Oan/enhX9SGXyYkv3o=; b=IJRZ+ccMYyIiOE/CYq3a/rXFW5BzIAENv+G+ydYvj3nHhOSrHQz1tR0DN9kuODo1pBDRS+ +t9Y1XQvocD/QqN9ybtfRFOpPVajZse33Eq8FsnQFmRQZEpQGj8pjOghpbDNLITR3tGbSq 3ihjw/8QYAkMYFGGDM62dYjUBiKYJ3ZsjprhjWgCTB4xrTlD8cIxHbaR4O5B0w1aMYduuP WK5HdGHWvRyU9Df+zKwKal3QYnCt4XbQ6xfBji/qdfq3guPGMIuXdPdnmErqdco8obB1/o JEbYe4BbRwcivjNctXQjg91vQ2bH77itaxS2E5wg8inlDhWUmZ8xYf2FwRhWCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716766024; a=rsa-sha256; cv=none; b=qDtmnwF5i8+vo2W7L/aujiybvegCp7CctlE5nZKlE7RehQx2QY/kmOA/4cfrcNr/H5fMoN dO50RmR+FRF1Ftx6Qi+cNT0yEngewe74nS1awse0fZ/ui3sckI1i0/IVC1kPkWz/IXYe2c e5X4HrT43tk9bWQS7ZSOMnzdr+/bvVtjopluWXDETlYyMc6PUleISccxoX2JieTiqB4GVM i+ywTWpdA+wJdiPYlF8f83TD6xgb4yMfGIy07dt/wQSt8GVD3i/vpxDx8+q+PP4JWAxd80 c8hDNAMslIR5JBrAMt7JTpSRnIm7AAfpHXj0GH71VpsvWqEWKtcY5QTjw9zFhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716766024; 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=E1FfMp8906veaC+Fmj/KtU787Oan/enhX9SGXyYkv3o=; b=GjKwEFmxZD7hjS7mQx3mEo581l/dZuqUiaHYGOMLfLqRQHCC+FmlJbJs0NMRVyQDHJFVyd lb0TBnaTIEpec6VJiH8IIeIZEBHm2rpL1B3eVkvxA+I4YQXAVjnH0M//nfyaLyhclvSOVJ zI5okKMYJmYos5VPtkd4yQmonYhCNr43+VG796EnXncDIYvoFLr4o4rAXX4mpFzhEY0vWK 1asrsVslMdssplWwei1Hzluu+mMO4tFr5z4ZfTs9DnWg4LVpiCTNgFAAXDsYRShW4sUtzd Se5FA+rOWb7ELAJsRTdiJ5uNdU4cKlDta8wFwA4uT2XksbKpj4Siado1mmKRGQ== 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 4VnZgD5ykDzLNx; Sun, 26 May 2024 23:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44QNR4IW068581; Sun, 26 May 2024 23:27:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44QNR4Fu068578; Sun, 26 May 2024 23:27:04 GMT (envelope-from git) Date: Sun, 26 May 2024 23:27:04 GMT Message-Id: <202405262327.44QNR4Fu068578@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: 76bc4a776fac - main - pfctl: use pfctl_add_rule_h() rather than pfctl_add_rule() 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: 76bc4a776facc73905eff5f70d52785de2100cac Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=76bc4a776facc73905eff5f70d52785de2100cac commit 76bc4a776facc73905eff5f70d52785de2100cac Author: Kristof Provost AuthorDate: 2024-05-26 21:06:12 +0000 Commit: Kristof Provost CommitDate: 2024-05-26 21:06:43 +0000 pfctl: use pfctl_add_rule_h() rather than pfctl_add_rule() This ensures we use the handle opened with pfctl_open(), and also brings us closer to the ideal state where everything uses the handle rather than a file descriptor. --- sbin/pfctl/pfctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 19d05c415f02..1843ec5713d6 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -2035,7 +2035,7 @@ pfctl_load_rule(struct pfctl *pf, char *path, struct pfctl_rule *r, int depth) if ((pf->opts & PF_OPT_NOACTION) == 0) { if (pfctl_add_pool(pf, &r->rpool, r->af)) return (1); - error = pfctl_add_rule(pf->dev, r, anchor, name, ticket, + error = pfctl_add_rule_h(pf->h, r, anchor, name, ticket, pf->paddr.ticket); switch (error) { case 0: