git: 047c4e365d15 - main - pf: renumber DIOCKEEPCOUNTERS
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 Nov 2021 15:37:14 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=047c4e365d15c4561fdffd9be650ac1245ce422c
commit 047c4e365d15c4561fdffd9be650ac1245ce422c
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2021-11-14 03:57:17 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
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
*/