summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_rmx.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-12-13 20:15:42 +0000
committerkmacy <kmacy@FreeBSD.org>2008-12-13 20:15:42 +0000
commit9c68b9deddc5ec1aeed70d4066ca6ff7f58711cb (patch)
tree125b101f1041ad0c9a8e592269ef073c494b0f39 /sys/netinet6/in6_rmx.c
parentf830e5c602f9c1dc13239abb288b9b144920be0b (diff)
downloadFreeBSD-src-9c68b9deddc5ec1aeed70d4066ca6ff7f58711cb.zip
FreeBSD-src-9c68b9deddc5ec1aeed70d4066ca6ff7f58711cb.tar.gz
in6_addroute is called through rnh_addadr which is always called with the radix node head lock held
exclusively. Pass RTF_RNH_LOCKED to rtalloc so that rtalloc1_fib will not try to re-acquire the lock.
Diffstat (limited to 'sys/netinet6/in6_rmx.c')
-rw-r--r--sys/netinet6/in6_rmx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 7e1a262..bb54341 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -160,7 +160,7 @@ in6_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,
* Find out if it is because of an
* ARP entry and delete it if so.
*/
- rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_CLONING);
+ rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_RNH_LOCKED|RTF_CLONING);
if (rt2) {
if (rt2->rt_flags & RTF_LLINFO &&
rt2->rt_flags & RTF_HOST &&
@@ -187,7 +187,7 @@ in6_addroute(void *v_arg, void *n_arg, struct radix_node_head *head,
* net route entry, 3ffe:0501:: -> if0.
* This case should not raise an error.
*/
- rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_CLONING);
+ rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_RNH_LOCKED|RTF_CLONING);
if (rt2) {
if ((rt2->rt_flags & (RTF_CLONING|RTF_HOST|RTF_GATEWAY))
== RTF_CLONING
OpenPOWER on IntegriCloud