diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2023-04-18 09:54:54 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2023-04-18 09:54:54 +0000 |
commit | 97b4d9cfbddab72faad2e971358141643b8a8ef2 (patch) | |
tree | 485113c799d9989140269645681d96340c1396df /sys/net/rtsock.c | |
parent | 6e968bd9e9cf9ceaf0a1719938ed5f128f13a985 (diff) |
Call sysctl_ifnames() with shared netlock. It performs read-only access
to netlock protected data.
ok kn@ bluhm@
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 19af84ff1b5..a57a12e0da2 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.359 2023/01/22 12:05:44 mvs Exp $ */ +/* $OpenBSD: rtsock.c,v 1.360 2023/04/18 09:54:53 mvs Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -2193,9 +2193,9 @@ sysctl_rtable(int *name, u_int namelen, void *where, size_t *given, void *new, &tableinfo, sizeof(tableinfo)); return (error); case NET_RT_IFNAMES: - NET_LOCK(); + NET_LOCK_SHARED(); error = sysctl_ifnames(&w); - NET_UNLOCK(); + NET_UNLOCK_SHARED(); break; case NET_RT_SOURCE: tableid = w.w_arg; |