svn commit: r248549 - stable/9/sys/netinet6

Andrey V. Elsukov ae at FreeBSD.org
Wed Mar 20 09:12:29 UTC 2013


Author: ae
Date: Wed Mar 20 09:12:28 2013
New Revision: 248549
URL: http://svnweb.freebsd.org/changeset/base/248549

Log:
  MFC r248180:
    Take the inpcb rlock before calculating checksum, it was accidentally
    moved in r191672.

Modified:
  stable/9/sys/netinet6/raw_ip6.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet6/raw_ip6.c
==============================================================================
--- stable/9/sys/netinet6/raw_ip6.c	Wed Mar 20 08:34:30 2013	(r248548)
+++ stable/9/sys/netinet6/raw_ip6.c	Wed Mar 20 09:12:28 2013	(r248549)
@@ -197,6 +197,7 @@ rip6_input(struct mbuf **mp, int *offp, 
 			    &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 @@ rip6_input(struct mbuf **mp, int *offp, 
 				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 svn-src-all mailing list