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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to