From 2b7bba217fbece129c8060deef42bf9eacc80c69 Mon Sep 17 00:00:00 2001 From: Randall Stewart Date: Sat, 17 Apr 2010 03:58:56 +0000 Subject: [PATCH] MFC of 203503 A fix to how the checksum code works that Michael put in. --- sys/netinet/sctp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 89a7a533725..d211e9ab7d4 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -5806,6 +5806,7 @@ sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port) } 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, int off, uint16_t port) 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) {