summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2013-03-11 18:01:55 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2013-03-11 18:01:55 +0000
commitc19e262bceeedeb50d490c49f9563a280e82db87 (patch)
tree2e29e8a9a66fc9c926cbf1e376c34d2b80bc028d /sys
parent869b10d8ebd8604816db4e3de621afcef6b0d02f (diff)
Don't use SCTP checksum offloading for SCTP/IPv6. At least the loopback
interface in stable/8 doesn't support it. Please note that this is a direct commit! Approved by: re@
Notes
svn path=/stable/8/; revision=248173
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/sctp_output.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index e7626380bcd2..4e805975c0bb 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -4447,9 +4447,8 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
#if defined(SCTP_WITH_NO_CSUM)
SCTP_STAT_INCR(sctps_sendnocrc);
#else
- m->m_pkthdr.csum_flags = CSUM_SCTP;
- m->m_pkthdr.csum_data = 0;
- SCTP_STAT_INCR(sctps_sendhwcrc);
+ sctphdr->checksum = sctp_calculate_cksum(m, sizeof(struct ip6_hdr));
+ SCTP_STAT_INCR(sctps_sendswcrc);
#endif
}
/* send it out. table id is taken from stcb */
@@ -11023,9 +11022,8 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockaddr *dst,
#if defined(SCTP_WITH_NO_CSUM)
SCTP_STAT_INCR(sctps_sendnocrc);
#else
- mout->m_pkthdr.csum_flags = CSUM_SCTP;
- mout->m_pkthdr.csum_data = 0;
- SCTP_STAT_INCR(sctps_sendhwcrc);
+ shout->checksum = sctp_calculate_cksum(mout, sizeof(struct ip6_hdr));
+ SCTP_STAT_INCR(sctps_sendswcrc);
#endif
}
#ifdef SCTP_PACKET_LOGGING