git: 8e492101ec04 - main - pf: add COMPAT_FREEBSD13 for DIOCKEEPCOUNTERS

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Wed, 17 Nov 2021 06:21:01 UTC
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=8e492101ec04d939f4a657d812785c01c8e4986d

commit 8e492101ec04d939f4a657d812785c01c8e4986d
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2021-11-15 20:14:00 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-11-17 02:09:20 +0000

    pf: add COMPAT_FREEBSD13 for DIOCKEEPCOUNTERS
    
    DIOCKEEPCOUNTERS used to overlap with DIOCGIFSPEEDV0, which has been
    fixed in 14, but remains in stable/12 and stable/13.
    Support the old, overlapping, call under COMPAT_FREEBSD13.
    
    Reviewed by:    jhb
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D33001
---
 sys/net/pfvar.h           | 1 +
 sys/netpfil/pf/pf_ioctl.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index ab22b9c5f3a4..c9c3ab082c71 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -1753,6 +1753,7 @@ struct pfioc_iface {
 #define	DIOCGETSYNCOOKIES	_IOWR('D', 94, struct pfioc_nv)
 #define	DIOCSETSYNCOOKIES	_IOWR('D', 95, struct pfioc_nv)
 #define	DIOCKEEPCOUNTERS	_IOWR('D', 96, struct pfioc_nv)
+#define	DIOCKEEPCOUNTERS_FREEBSD13	_IOWR('D', 92, struct pfioc_nv)
 
 struct pf_ifspeed_v0 {
 	char			ifname[IFNAMSIZ];
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 727ebb0135f4..f5612f6d0084 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -4665,6 +4665,9 @@ DIOCCHANGEADDR_error:
 		pf_kill_srcnodes((struct pfioc_src_node_kill *)addr);
 		break;
 
+#ifdef COMPAT_FREEBSD13
+	case DIOCKEEPCOUNTERS_FREEBSD13:
+#endif
 	case DIOCKEEPCOUNTERS:
 		error = pf_keepcounters((struct pfioc_nv *)addr);
 		break;