and shared netlock respectively.
OK kn@ mvs@
-/* $OpenBSD: art.h,v 1.22 2023/04/18 10:19:16 mvs Exp $ */
+/* $OpenBSD: art.h,v 1.23 2023/04/19 17:42:47 bluhm Exp $ */
/*
* Copyright (c) 2015 Martin Pieuchot
uint8_t ar_nlvl; /* [I] Number of levels */
uint8_t ar_alen; /* [I] Address length in bits */
uint8_t ar_off; /* [I] Offset of key in bytes */
- struct sockaddr *ar_source; /* [K] optional src addr to use */
+ struct sockaddr *ar_source; /* [N] use optional src addr */
};
#define ISLEAF(e) (((unsigned long)(e) & 1) == 0)
-/* $OpenBSD: rtable.c,v 1.81 2023/04/18 10:19:16 mvs Exp $ */
+/* $OpenBSD: rtable.c,v 1.82 2023/04/19 17:42:47 bluhm Exp $ */
/*
* Copyright (c) 2014-2016 Martin Pieuchot
{
struct art_root *ar;
+ NET_ASSERT_LOCKED_EXCLUSIVE();
+
if ((ar = rtable_get(rtableid, af)) == NULL)
return (EAFNOSUPPORT);
{
struct art_root *ar;
+ NET_ASSERT_LOCKED();
+
ar = rtable_get(rtableid, af);
if (ar == NULL)
return (NULL);
-/* $OpenBSD: rtsock.c,v 1.363 2023/04/18 22:01:24 mvs Exp $ */
+/* $OpenBSD: rtsock.c,v 1.364 2023/04/19 17:42:47 bluhm Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
type = rtm->rtm_type;
seq = rtm->rtm_seq;
free(rtm, M_RTABLE, len);
+ NET_LOCK_SHARED();
rtm = rtm_report(rt, type, seq, tableid);
+ NET_UNLOCK_SHARED();
len = rtm->rtm_msglen;
}
}