Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Apr 2010 03:58:56 +0000 (UTC)
From:      Randall Stewart <rrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r206733 - stable/8/sys/netinet
Message-ID:  <201004170358.o3H3wuld040488@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rrs
Date: Sat Apr 17 03:58:56 2010
New Revision: 206733
URL: http://svn.freebsd.org/changeset/base/206733

Log:
  MFC of  203503
  
  A fix to how the checksum code works that Michael put in.

Modified:
  stable/8/sys/netinet/sctp_input.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet/sctp_input.c
==============================================================================
--- stable/8/sys/netinet/sctp_input.c	Sat Apr 17 03:57:16 2010	(r206732)
+++ stable/8/sys/netinet/sctp_input.c	Sat Apr 17 03:58:56 2010	(r206733)
@@ -5806,6 +5806,7 @@ sctp_input_with_port(struct mbuf *i_pak,
 	}
 	sh->checksum = 0;	/* prepare for calc */
 	calc_check = sctp_calculate_cksum(m, iphlen);
+	sh->checksum = check;
 	SCTP_STAT_INCR(sctps_recvswcrc);
 	if (calc_check != check) {
 		SCTPDBG(SCTP_DEBUG_INPUT1, "Bad CSUM on SCTP packet calc_check:%x check:%x  m:%p mlen:%d iphlen:%d\n",
@@ -5831,7 +5832,6 @@ sctp_input_with_port(struct mbuf *i_pak,
 		SCTP_STAT_INCR_COUNTER32(sctps_checksumerrors);
 		goto bad;
 	}
-	sh->checksum = calc_check;
 sctp_skip_csum_4:
 	/* destination port of 0 is illegal, based on RFC2960. */
 	if (sh->dest_port == 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004170358.o3H3wuld040488>