From nobody Sun Nov 14 15:37:14 2021 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 4777F184ACBA; Sun, 14 Nov 2021 15:37:15 +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 4Hsbzb1DR8z4bKD; Sun, 14 Nov 2021 15:37:15 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0B5DDDCD; Sun, 14 Nov 2021 15:37:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AEFbEx1008813; Sun, 14 Nov 2021 15:37:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AEFbEkA008812; Sun, 14 Nov 2021 15:37:14 GMT (envelope-from git) Date: Sun, 14 Nov 2021 15:37:14 GMT Message-Id: <202111141537.1AEFbEkA008812@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: 047c4e365d15 - main - pf: renumber DIOCKEEPCOUNTERS 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: 047c4e365d15c4561fdffd9be650ac1245ce422c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=047c4e365d15c4561fdffd9be650ac1245ce422c commit 047c4e365d15c4561fdffd9be650ac1245ce422c Author: Kristof Provost AuthorDate: 2021-11-14 03:57:17 +0000 Commit: Kristof Provost CommitDate: 2021-11-14 14:36:59 +0000 pf: renumber DIOCKEEPCOUNTERS We accidentally had two ioctls use the same base number (DIOCKEEPCOUNTERS and DIOCGIFSPEEDV{0,1}). We get away with that on most platforms because the size of the argument structures is different. This does break CHERI, and is generally a bad idea anyway. Renumber to avoid this collision. Reported by: jhb --- sys/net/pfvar.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index a6994e8b1846..ab22b9c5f3a4 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1747,10 +1747,12 @@ struct pfioc_iface { #define DIOCSETIFFLAG _IOWR('D', 89, struct pfioc_iface) #define DIOCCLRIFFLAG _IOWR('D', 90, struct pfioc_iface) #define DIOCKILLSRCNODES _IOWR('D', 91, struct pfioc_src_node_kill) -#define DIOCKEEPCOUNTERS _IOWR('D', 92, struct pfioc_nv) +#define DIOCGIFSPEEDV0 _IOWR('D', 92, struct pf_ifspeed_v0) +#define DIOCGIFSPEEDV1 _IOWR('D', 92, struct pf_ifspeed_v1) #define DIOCGETSTATESV2 _IOWR('D', 93, struct pfioc_states_v2) #define DIOCGETSYNCOOKIES _IOWR('D', 94, struct pfioc_nv) #define DIOCSETSYNCOOKIES _IOWR('D', 95, struct pfioc_nv) +#define DIOCKEEPCOUNTERS _IOWR('D', 96, struct pfioc_nv) struct pf_ifspeed_v0 { char ifname[IFNAMSIZ]; @@ -1767,9 +1769,6 @@ struct pf_ifspeed_v1 { /* Latest version of struct pf_ifspeed_vX */ #define PF_IFSPEED_VERSION 1 -#define DIOCGIFSPEEDV0 _IOWR('D', 92, struct pf_ifspeed_v0) -#define DIOCGIFSPEEDV1 _IOWR('D', 92, struct pf_ifspeed_v1) - /* * Compatibility and convenience macros */