git: 6dbde8424561 - stable/13 - sockets: Add sysctl flag CTLFLAG_TUN to loader tunable

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Thu, 12 Oct 2023 04:21:01 UTC
The branch stable/13 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=6dbde842456151de0cec331b99e7330a80ae949c

commit 6dbde842456151de0cec331b99e7330a80ae949c
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2023-10-09 10:30:22 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2023-10-12 04:19:37 +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
    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 e5997e439964..bcf0ad2ade2c 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -373,8 +373,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");
 
 /*