git: 1f7a710ab358 - main - ipfilter: Remove unused ioctl

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Wed, 07 Sep 2022 03:11:57 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=1f7a710ab35845049f17958c3783041c214d8a3c

commit 1f7a710ab35845049f17958c3783041c214d8a3c
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-09-06 20:58:35 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-09-07 02:57:05 +0000

    ipfilter: Remove unused ioctl
    
    The SIOCSTAT1 ioctl is only used in ip_auth and is unused in ip_state.
    The ip_state version was likely added to support a new statistic yet
    to be developed in ipfstat(8) or for some sample userspace application
    (similar in fashion to the sample provided for authentication rules).
    There is no need to report individual state hash table bucket lengths
    to any future userspace application.
    
    If needed for any future debugging purposes a DTrace probe would be a
    better vehicle.
    
    This unused ioctl in ip_stat results in a panic.
    
    PR:             266124
    Reported by:    Robert Morris <rtm@lcs.mit.edu>
    MFC after:      3 days
---
 sys/netpfil/ipfilter/netinet/ip_state.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c
index cc0e8559fb16..463416f454a9 100644
--- a/sys/netpfil/ipfilter/netinet/ip_state.c
+++ b/sys/netpfil/ipfilter/netinet/ip_state.c
@@ -751,18 +751,6 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd,
 		error = ipf_state_getent(softc, softs, data);
 		break;
 
-	/*
-	 * Return a copy of the hash table bucket lengths
-	 */
-	case SIOCSTAT1 :
-		error = BCOPYOUT(softs->ipf_state_stats.iss_bucketlen, data,
-				 softs->ipf_state_size * sizeof(u_int));
-		if (error != 0) {
-			IPFERROR(100017);
-			error = EFAULT;
-		}
-		break;
-
 	case SIOCGENITER :
 	    {
 		ipftoken_t *token;