From owner-svn-src-all@FreeBSD.ORG Thu Feb 4 21:02:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D0101065670; Thu, 4 Feb 2010 21:02:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B6228FC18; Thu, 4 Feb 2010 21:02:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o14L2T92029659; Thu, 4 Feb 2010 21:02:29 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o14L2Tdd029657; Thu, 4 Feb 2010 21:02:29 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201002042102.o14L2Tdd029657@svn.freebsd.org> From: Michael Tuexen Date: Thu, 4 Feb 2010 21:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203503 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2010 21:02:29 -0000 Author: tuexen Date: Thu Feb 4 21:02:29 2010 New Revision: 203503 URL: http://svn.freebsd.org/changeset/base/203503 Log: Restore the checksum received before processing the packet. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Thu Feb 4 19:49:41 2010 (r203502) +++ head/sys/netinet/sctp_input.c Thu Feb 4 21:02:29 2010 (r203503) @@ -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) {