As sysctl_ifnames(), it performs read-only access to netlock protected
data.

Index: sys/net/rtsock.c
===================================================================
RCS file: /cvs/src/sys/net/rtsock.c,v
retrieving revision 1.359
diff -u -p -r1.359 rtsock.c
--- sys/net/rtsock.c    22 Jan 2023 12:05:44 -0000      1.359
+++ sys/net/rtsock.c    16 Apr 2023 22:16:21 -0000
@@ -2175,9 +2175,9 @@ sysctl_rtable(int *name, u_int namelen, 
                break;
 
        case NET_RT_IFLIST:
-               NET_LOCK();
+               NET_LOCK_SHARED();
                error = sysctl_iflist(af, &w);
-               NET_UNLOCK();
+               NET_UNLOCK_SHARED();
                break;
 
        case NET_RT_STATS:

Reply via email to