summaryrefslogtreecommitdiff
path: root/sys/net/route.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/route.h')
-rw-r--r--sys/net/route.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net/route.h b/sys/net/route.h
index 2178e401731..4c0c38577dc 100644
--- a/sys/net/route.h
+++ b/sys/net/route.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.h,v 1.196 2022/06/28 10:01:13 bluhm Exp $ */
+/* $OpenBSD: route.h,v 1.197 2023/01/21 17:35:01 mvs Exp $ */
/* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */
/*
@@ -383,6 +383,13 @@ struct rt_addrinfo {
#ifdef _KERNEL
#include <sys/percpu.h>
+#include <sys/rwlock.h>
+
+extern struct rwlock rt_lock;
+
+#define RT_LOCK() rw_enter_write(&rt_lock)
+#define RT_UNLOCK() rw_exit_write(&rt_lock)
+#define RT_ASSERT_LOCKED() rw_assert_wrlock(&rt_lock)
enum rtstat_counters {
rts_badredirect, /* bogus redirect calls */