diff options
author | Randall Stewart <rrs@FreeBSD.org> | 2010-03-12 22:58:52 +0000 |
---|---|---|
committer | Randall Stewart <rrs@FreeBSD.org> | 2010-03-12 22:58:52 +0000 |
commit | 1966e5b5a1c43050be44cf863defcccefad7c752 (patch) | |
tree | eeed8f9c724c05485087e8c9541f2d96864ccbd3 /sys/netinet/ip_divert.c | |
parent | 41ecefa55097a4998f2fd0bf668101906add1dac (diff) | |
download | src-1966e5b5a1c43050be44cf863defcccefad7c752.tar.gz src-1966e5b5a1c43050be44cf863defcccefad7c752.zip |
The proper fix for the delayed SCTP checksum is to
have the delayed function take an argument as to the offset
to the SCTP header. This allows it to work for V4 and V6.
This of course means changing all callers of the function
to either pass the header len, if they have it, or create
it (ip_hl << 2 or sizeof(ip6_hdr)).
PR: 144529
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=205104
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r-- | sys/netinet/ip_divert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 7fd20f84527c..22e52bafbf2b 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -227,7 +227,7 @@ divert_packet(struct mbuf *m, int incoming) #ifdef SCTP if (m->m_pkthdr.csum_flags & CSUM_SCTP) { ip->ip_len = ntohs(ip->ip_len); - sctp_delayed_cksum(m); + sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; ip->ip_len = htons(ip->ip_len); } |