From c19e262bceeedeb50d490c49f9563a280e82db87 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Mon, 11 Mar 2013 18:01:55 +0000 Subject: 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@ --- sys/netinet/sctp_output.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sys') 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 -- cgit v1.3