summaryrefslogtreecommitdiff
path: root/sys/net/rtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/rtable.c')
-rw-r--r--sys/net/rtable.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/rtable.c b/sys/net/rtable.c
index 24fce7d9ea4..77bd9517012 100644
--- a/sys/net/rtable.c
+++ b/sys/net/rtable.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtable.c,v 1.47 2016/06/14 04:42:02 jmatthew Exp $ */
+/* $OpenBSD: rtable.c,v 1.48 2016/06/22 06:32:32 dlg Exp $ */
/*
* Copyright (c) 2014-2015 Martin Pieuchot
@@ -853,16 +853,16 @@ struct rtable_walk_cookie {
int
rtable_walk_helper(struct art_node *an, void *xrwc)
{
+ struct srp_ref sr;
struct rtable_walk_cookie *rwc = xrwc;
- struct rtentry *rt, *nrt;
+ struct rtentry *rt;
int error = 0;
- KERNEL_ASSERT_LOCKED();
-
- SRPL_FOREACH_SAFE_LOCKED(rt, &an->an_rtlist, rt_next, nrt) {
+ SRPL_FOREACH(rt, &sr, &an->an_rtlist, rt_next) {
if ((error = (*rwc->rwc_func)(rt, rwc->rwc_arg, rwc->rwc_rid)))
break;
}
+ SRPL_LEAVE(&sr);
return (error);
}