git: 83091c864451 - releng/14.0 - sockets: Add sysctl flag CTLFLAG_TUN to loader tunable

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Thu, 12 Oct 2023 15:02:53 UTC
The branch releng/14.0 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=83091c8644516091040f32bc266f1204b0e2950d

commit 83091c8644516091040f32bc266f1204b0e2950d
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2023-10-09 10:30:22 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2023-10-12 14:59:52 +0000

    sockets: Add sysctl flag CTLFLAG_TUN to loader tunable
    
    The sysctl variable 'kern.ipc.maxsockets' is actually a loader tunable.
    Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it
    correctly.
    
    No functional change intended.
    
    Reviewed by:    kib, imp
    Approved by:    re (gjb)
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D42113
    
    (cherry picked from commit 978be1ee5d5fef983b4163955e15c4269c0ec76d)
    (cherry picked from commit e4f97a1ec798d69b8ebf767d0dd2e43fbb1550f6)
---
 sys/kern/uipc_socket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 3c7e5c4cb4bb..880dec89245b 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -366,8 +366,8 @@ sysctl_maxsockets(SYSCTL_HANDLER_ARGS)
 	return (error);
 }
 SYSCTL_PROC(_kern_ipc, OID_AUTO, maxsockets,
-    CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &maxsockets, 0,
-    sysctl_maxsockets, "IU",
+    CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE,
+    &maxsockets, 0, sysctl_maxsockets, "IU",
     "Maximum number of sockets available");
 
 /*