summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2010-02-04 21:02:29 +0000
committertuexen <tuexen@FreeBSD.org>2010-02-04 21:02:29 +0000
commit78aa3f59ba3251a4cf2932410926cbeb7ede7284 (patch)
tree9e3648413399c5b4ce83db2dba83542b1923d459
parent744e8a4159d16282d0185d06a7a13509d894fa6a (diff)
downloadFreeBSD-src-78aa3f59ba3251a4cf2932410926cbeb7ede7284.zip
FreeBSD-src-78aa3f59ba3251a4cf2932410926cbeb7ede7284.tar.gz
Restore the checksum received before processing the packet.
MFC after: 1 week
-rw-r--r--sys/netinet/sctp_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index 89a7a53..d211e9a 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) {
OpenPOWER on IntegriCloud