diff options
author | hsu <hsu@FreeBSD.org> | 2002-12-24 03:03:39 +0000 |
---|---|---|
committer | hsu <hsu@FreeBSD.org> | 2002-12-24 03:03:39 +0000 |
commit | 32436a25c0510e4371c6f02353b447c09ba9db0d (patch) | |
tree | 5e53dfd4f16f3a5c2080f2ce73aed007b1be63a1 /sys/netinet6 | |
parent | 018c02046059a2588bdd154c9136e4467aafa156 (diff) | |
download | FreeBSD-src-32436a25c0510e4371c6f02353b447c09ba9db0d.zip FreeBSD-src-32436a25c0510e4371c6f02353b447c09ba9db0d.tar.gz |
SMP locking for radix nodes.
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_rmx.c | 11 | ||||
-rw-r--r-- | sys/netinet6/nd6_rtr.c | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c index 60732b2..14587bd 100644 --- a/sys/netinet6/in6_rmx.c +++ b/sys/netinet6/in6_rmx.c @@ -257,8 +257,7 @@ in6_clsroute(struct radix_node *rn, struct radix_node_head *head) if ((rt->rt_flags & (RTF_LLINFO | RTF_HOST)) != RTF_HOST) return; - if ((rt->rt_flags & (RTF_WASCLONED | RTPRF_OURS)) - != RTF_WASCLONED) + if ((rt->rt_flags & (RTF_WASCLONED | RTPRF_OURS)) != RTF_WASCLONED) return; /* @@ -347,7 +346,9 @@ in6_rtqtimo(void *rock) arg.nextstop = time_second + rtq_timeout; arg.draining = arg.updating = 0; s = splnet(); + RADIX_NODE_HEAD_LOCK(rnh); rnh->rnh_walktree(rnh, in6_rtqkill, &arg); + RADIX_NODE_HEAD_UNLOCK(rnh); splx(s); /* @@ -374,7 +375,9 @@ in6_rtqtimo(void *rock) arg.found = arg.killed = 0; arg.updating = 1; s = splnet(); + RADIX_NODE_HEAD_LOCK(rnh); rnh->rnh_walktree(rnh, in6_rtqkill, &arg); + RADIX_NODE_HEAD_UNLOCK(rnh); splx(s); } @@ -426,7 +429,9 @@ in6_mtutimo(void *rock) arg.rnh = rnh; arg.nextstop = time_second + MTUTIMO_DEFAULT; s = splnet(); + RADIX_NODE_HEAD_LOCK(rnh); rnh->rnh_walktree(rnh, in6_mtuexpire, &arg); + RADIX_NODE_HEAD_UNLOCK(rnh); splx(s); atv.tv_usec = 0; @@ -451,7 +456,9 @@ in6_rtqdrain() arg.draining = 1; arg.updating = 0; s = splnet(); + RADIX_NODE_HEAD_LOCK(rnh); rnh->rnh_walktree(rnh, in6_rtqkill, &arg); + RADIX_NODE_HEAD_UNLOCK(rnh); splx(s); } #endif diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index efb4867..c920636 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1908,7 +1908,9 @@ rt6_flush(gateway, ifp) /* XXX: hack for KAME's link-local address kludge */ gateway->s6_addr16[1] = htons(ifp->if_index); + RADIX_NODE_HEAD_LOCK(rnh); rnh->rnh_walktree(rnh, rt6_deleteroute, (void *)gateway); + RADIX_NODE_HEAD_UNLOCK(rnh); splx(s); } |