svn commit: r266081 - stable/9/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Wed May 14 19:00:02 UTC 2014
Author: tuexen
Date: Wed May 14 19:00:01 2014
New Revision: 266081
URL: http://svnweb.freebsd.org/changeset/base/266081
Log:
MFC r263096:
Put the offset of the CRC32C in csum_data instead of 0.
The virtio driver needs the offset to be stored in csum_data,
like in the case for UDP and TCP.
The virtio problem was reported by
Niu Zhixiong <kaiaixi at gmail.com>, who helped in debugging
and testing the patch.
Modified:
stable/9/sys/netinet/sctp_output.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/netinet/sctp_output.c
==============================================================================
--- stable/9/sys/netinet/sctp_output.c Wed May 14 18:57:09 2014 (r266080)
+++ stable/9/sys/netinet/sctp_output.c Wed May 14 19:00:01 2014 (r266081)
@@ -4108,7 +4108,7 @@ sctp_lowlevel_chunk_output(struct sctp_i
SCTP_STAT_INCR(sctps_sendnocrc);
#else
m->m_pkthdr.csum_flags = CSUM_SCTP;
- m->m_pkthdr.csum_data = 0;
+ m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum);
SCTP_STAT_INCR(sctps_sendhwcrc);
#endif
}
@@ -4457,7 +4457,7 @@ sctp_lowlevel_chunk_output(struct sctp_i
SCTP_STAT_INCR(sctps_sendnocrc);
#else
m->m_pkthdr.csum_flags = CSUM_SCTP_IPV6;
- m->m_pkthdr.csum_data = 0;
+ m->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum);
SCTP_STAT_INCR(sctps_sendhwcrc);
#endif
}
@@ -11007,7 +11007,7 @@ sctp_send_resp_msg(struct sockaddr *src,
SCTP_STAT_INCR(sctps_sendnocrc);
#else
mout->m_pkthdr.csum_flags = CSUM_SCTP;
- mout->m_pkthdr.csum_data = 0;
+ mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum);
SCTP_STAT_INCR(sctps_sendhwcrc);
#endif
}
@@ -11037,7 +11037,7 @@ sctp_send_resp_msg(struct sockaddr *src,
SCTP_STAT_INCR(sctps_sendnocrc);
#else
mout->m_pkthdr.csum_flags = CSUM_SCTP_IPV6;
- mout->m_pkthdr.csum_data = 0;
+ mout->m_pkthdr.csum_data = offsetof(struct sctphdr, checksum);
SCTP_STAT_INCR(sctps_sendhwcrc);
#endif
}
More information about the svn-src-stable-9
mailing list