git: ebfd3b229af1 - main - pf: move DIOCGETSTATES(V2) to COMPAT_FREEBSD14
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 10 Oct 2023 09:50:39 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ebfd3b229af1cf0036ebaedbb09d9721ec037c0f commit ebfd3b229af1cf0036ebaedbb09d9721ec037c0f Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-10-06 09:16:11 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-10-10 09:48:22 +0000 pf: move DIOCGETSTATES(V2) to COMPAT_FREEBSD14 We now have an improved version (via netlink). The old-style ioctl will be removed in FreeBSD 16. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42101 --- sys/net/pfvar.h | 4 ++++ sys/netpfil/pf/pf_ioctl.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index a5eeb60a0d7c..f5ea9bf71f0c 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1951,7 +1951,9 @@ struct pfioc_iface { #define DIOCCLRSTATUS _IO ('D', 22) #define DIOCNATLOOK _IOWR('D', 23, struct pfioc_natlook) #define DIOCSETDEBUG _IOWR('D', 24, u_int32_t) +#ifdef COMPAT_FREEBSD14 #define DIOCGETSTATES _IOWR('D', 25, struct pfioc_states) +#endif #define DIOCCHANGERULE _IOWR('D', 26, struct pfioc_rule) /* XXX cut 26 - 28 */ #define DIOCSETTIMEOUT _IOWR('D', 29, struct pfioc_tm) @@ -2012,7 +2014,9 @@ struct pfioc_iface { #define DIOCKILLSRCNODES _IOWR('D', 91, struct pfioc_src_node_kill) #define DIOCGIFSPEEDV0 _IOWR('D', 92, struct pf_ifspeed_v0) #define DIOCGIFSPEEDV1 _IOWR('D', 92, struct pf_ifspeed_v1) +#ifdef COMPAT_FREEBSD14 #define DIOCGETSTATESV2 _IOWR('D', 93, struct pfioc_states_v2) +#endif #define DIOCGETSYNCOOKIES _IOWR('D', 94, struct pfioc_nv) #define DIOCSETSYNCOOKIES _IOWR('D', 95, struct pfioc_nv) #define DIOCKEEPCOUNTERS _IOWR('D', 96, struct pfioc_nv) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 42c2aa9bfb01..5a441c9723e3 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2365,8 +2365,10 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td case DIOCCLRSTATUS: case DIOCNATLOOK: case DIOCSETDEBUG: +#ifdef COMPAT_FREEBSD14 case DIOCGETSTATES: case DIOCGETSTATESV2: +#endif case DIOCGETTIMEOUT: case DIOCCLRRULECTRS: case DIOCGETLIMIT: @@ -2423,8 +2425,10 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td case DIOCGETSTATE: case DIOCGETSTATENV: case DIOCGETSTATUSNV: +#ifdef COMPAT_FREEBSD14 case DIOCGETSTATES: case DIOCGETSTATESV2: +#endif case DIOCGETTIMEOUT: case DIOCGETLIMIT: case DIOCGETALTQSV0: @@ -3546,6 +3550,7 @@ DIOCCHANGERULE_error: break; } +#ifdef COMPAT_FREEBSD14 case DIOCGETSTATES: { struct pfioc_states *ps = (struct pfioc_states *)addr; struct pf_kstate *s; @@ -3697,7 +3702,7 @@ DIOCGETSTATESV2_full: break; } - +#endif case DIOCGETSTATUSNV: { error = pf_getstatus((struct pfioc_nv *)addr); break;