[Midnightbsd-cvs] src [8996] trunk/sys/netinet6/raw_ip6.c: take the inpcb rlock before calculation checksum.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Sep 29 21:32:23 EDT 2016
Revision: 8996
http://svnweb.midnightbsd.org/src/?rev=8996
Author: laffer1
Date: 2016-09-29 21:32:23 -0400 (Thu, 29 Sep 2016)
Log Message:
-----------
take the inpcb rlock before calculation checksum.
Modified Paths:
--------------
trunk/sys/netinet6/raw_ip6.c
Modified: trunk/sys/netinet6/raw_ip6.c
===================================================================
--- trunk/sys/netinet6/raw_ip6.c 2016-09-30 01:31:53 UTC (rev 8995)
+++ trunk/sys/netinet6/raw_ip6.c 2016-09-30 01:32:23 UTC (rev 8996)
@@ -197,6 +197,7 @@
&ip6->ip6_dst) != 0)
continue;
}
+ INP_RLOCK(in6p);
if (in6p->in6p_cksum != -1) {
V_rip6stat.rip6s_isum++;
if (in6_cksum(m, proto, *offp,
@@ -206,7 +207,6 @@
continue;
}
}
- INP_RLOCK(in6p);
/*
* If this raw socket has multicast state, and we
* have received a multicast, check if this socket
More information about the Midnightbsd-cvs
mailing list