access to netlock protected data.
ok kn@ bluhm@
-/* $OpenBSD: rtsock.c,v 1.364 2023/04/19 17:42:47 bluhm Exp $ */
+/* $OpenBSD: rtsock.c,v 1.365 2023/04/20 21:43:17 mvs Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
tableid = w.w_arg;
if (!rtable_exists(tableid))
return (ENOENT);
- NET_LOCK();
+ NET_LOCK_SHARED();
for (i = 1; i <= AF_MAX; i++) {
if (af != 0 && af != i)
continue;
if (error)
break;
}
- NET_UNLOCK();
+ NET_UNLOCK_SHARED();
break;
}
free(w.w_tmem, M_RTABLE, w.w_tmemsize);