From nobody Tue Oct 10 09:50:39 2023 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 4S4WNv4WSRz4wV8G; Tue, 10 Oct 2023 09:50:39 +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 4S4WNv32dLz3Nky; Tue, 10 Oct 2023 09:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696931439; 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=YijiyJ6XXyp0THi8Ez0HhowYTdqqHUCzjSIe60Jetjw=; b=EPi/M5vZpKeIg/IGYNeEstThBEaDziHcjdych0J3lpz39Lsi5QOcR3EwxLjXI43qFZjfAD 8qrgBvRarF/4nE2/S/FHGiV7uAI0XhSxA6Qu2ZGBHalAAhsltfVtSyHDWjHbGFImkovOeK Ek+RaisOVxydEvxxalpdCDG4PNEI3HEfvSYks7WloRwlLA1agwiEtM2TocIzNJ2FmkjTr3 TlWLCHlJqhR4pDtoErb4sxUvplI4LpDr8+Tpu9WfZ9f7OdkaBO8tFZADLsbtFTFPFGNs+J q8zRxpIRhdb/IEWJSpJiMbVc3O6RuvuwROwsJqHDTHy3b/rixiU25OO2wHKdSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696931439; a=rsa-sha256; cv=none; b=yKv6e6I38AjezUbz6XTCb9pTx8j3Ve8EYIPnAGBoWoDQTNwx4TvzYwIS+0Mr15gxm8bWWv hqllfupBHvMURZYLxCKbci3KQRirWRicPuMchZz/lSxSfDsolLD7VaynekADCAHIAaHhqk XBUxkdbJCSCun0Cd+qUUVuCvta/2G7FTJMn2X9Z6n4g/q3CLZAzTjM9GegugRH1dz5P1TF HDOpBFk86NEg1/vQX8QsI4mPiBbVjiQRh6UM+FwIhzXA+Gbth30yUAEpXXpIV/fm7lSZkj Pv8jUsLjUVRUOmVmBoDJDvFs+V0loTCoDJDnNgm+bQgPaz4UzTLbKDO4Egm6WA== 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=1696931439; 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=YijiyJ6XXyp0THi8Ez0HhowYTdqqHUCzjSIe60Jetjw=; b=IEYQmva+Swv8n2yrzYY1ODihRJvnZWMcLain/MuBiD7xcHPe67pcECrbFbx9GJKqJu8T/8 /Gg3SWvLPxZxOLr3SuXpaCj/iadu0P/qlg1R7KXXEGpJtk9fvibOtREfd2w+JtXJxB3owb p9VxoS/EM6lzBMfevQpK1OXvAQFxcOvQOHXfo0kzS/8S/HDzrfoUDBMdHSkNWUujW7Ps4y QBJz3HYsc7bS4/za8DYxrW5HlGscnqIw8x6kPGXqV5QtYTnU8ehImtJNagy0rWUWTmfbro FMTi82pxm6Pcfb2ttI9UZx7aCNLBny/Ch7JB2heGPsGfIvUH2xgdVAXT+zrl8Q== 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 4S4WNv1RDCzZ3r; Tue, 10 Oct 2023 09:50:39 +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 39A9odW2030195; Tue, 10 Oct 2023 09:50:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39A9odxB030192; Tue, 10 Oct 2023 09:50:39 GMT (envelope-from git) Date: Tue, 10 Oct 2023 09:50:39 GMT Message-Id: <202310100950.39A9odxB030192@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: ebfd3b229af1 - main - pf: move DIOCGETSTATES(V2) to COMPAT_FREEBSD14 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: ebfd3b229af1cf0036ebaedbb09d9721ec037c0f Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ebfd3b229af1cf0036ebaedbb09d9721ec037c0f commit ebfd3b229af1cf0036ebaedbb09d9721ec037c0f Author: Kristof Provost AuthorDate: 2023-10-06 09:16:11 +0000 Commit: Kristof Provost 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;