summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-04-21 12:06:41 +0000
committerrwatson <rwatson@FreeBSD.org>2008-04-21 12:06:41 +0000
commit9ee84cddef0af6abc4d9dfc1cd142a36175a4e6a (patch)
treeb881bb2a1f9358bee7e39fc3179daaf0f697eadc /sys/netinet6
parentc6e37355a2f7b8c97a9e27321b849448a8a909a8 (diff)
downloadFreeBSD-src-9ee84cddef0af6abc4d9dfc1cd142a36175a4e6a.zip
FreeBSD-src-9ee84cddef0af6abc4d9dfc1cd142a36175a4e6a.tar.gz
With IPv4 raw sockets, read lock rather than write lock the inpcb when
receiving or transmitting. With IPv6 raw sockets, read lock rather than write lock the inpcb when receiving. Unfortunately, IPv6 source address selection appears to require a write lock on the inpcb for the time being. MFC after: 3 months
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/raw_ip6.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index c12bde1..b791872 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -154,10 +154,10 @@ rip6_input(struct mbuf **mp, int *offp, int proto)
INP_INFO_RLOCK(&ripcbinfo);
LIST_FOREACH(in6p, &ripcb, inp_list) {
- INP_WLOCK(in6p);
+ INP_RLOCK(in6p);
if ((in6p->in6p_vflag & INP_IPV6) == 0) {
docontinue:
- INP_WUNLOCK(in6p);
+ INP_RUNLOCK(in6p);
continue;
}
if (in6p->in6p_ip6_nxt &&
@@ -207,7 +207,7 @@ docontinue:
sorwakeup(last->in6p_socket);
opts = NULL;
}
- INP_WUNLOCK(last);
+ INP_RUNLOCK(last);
}
last = in6p;
}
@@ -220,7 +220,7 @@ docontinue:
ipsec6stat.in_polvio++;
ip6stat.ip6s_delivered--;
/* do not inject data into pcb */
- INP_WUNLOCK(last);
+ INP_RUNLOCK(last);
} else
#endif /* IPSEC */
if (last) {
@@ -237,7 +237,7 @@ docontinue:
rip6stat.rip6s_fullsock++;
} else
sorwakeup(last->in6p_socket);
- INP_WUNLOCK(last);
+ INP_RUNLOCK(last);
} else {
rip6stat.rip6s_nosock++;
if (m->m_flags & M_MCAST)
OpenPOWER on IntegriCloud