1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

In ICMPv6, read lock rather than write lock the inpcb on receive.

MFC after:	3 months
This commit is contained in:
Robert Watson 2008-04-21 12:08:40 +00:00
parent 9ad11dd8a4
commit bb145f600c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178378

View File

@ -1891,10 +1891,10 @@ icmp6_rip6_input(struct mbuf **mp, int off)
INP_INFO_RLOCK(&ripcbinfo);
LIST_FOREACH(in6p, &ripcb, inp_list) {
INP_WLOCK(in6p);
INP_RLOCK(in6p);
if ((in6p->inp_vflag & INP_IPV6) == 0) {
docontinue:
INP_WUNLOCK(in6p);
INP_RUNLOCK(in6p);
continue;
}
if (in6p->in6p_ip6_nxt != IPPROTO_ICMPV6)
@ -1965,7 +1965,7 @@ icmp6_rip6_input(struct mbuf **mp, int off)
sorwakeup_locked(last->in6p_socket);
opts = NULL;
}
INP_WUNLOCK(last);
INP_RUNLOCK(last);
}
last = in6p;
}
@ -2003,7 +2003,7 @@ icmp6_rip6_input(struct mbuf **mp, int off)
SOCKBUF_UNLOCK(&last->in6p_socket->so_rcv);
} else
sorwakeup_locked(last->in6p_socket);
INP_WUNLOCK(last);
INP_RUNLOCK(last);
} else {
m_freem(m);
ip6stat.ip6s_delivered--;