diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-04 00:10:22 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-04 00:10:22 +0000 |
commit | 441d4acfe5b5ea527084930a60e90656a254c881 (patch) | |
tree | b76347fabadc1397e9867bde5ec4e4a80709a07e /pkg/tcpip/stack/conntrack.go | |
parent | baa0ab982f66510088d66778cf063ff72e6f9022 (diff) | |
parent | 1cd76d958a9b3eb29f6b55a8bea71fbe464e67d3 (diff) |
Merge release-20210301.0-12-g1cd76d958 (automated)
Diffstat (limited to 'pkg/tcpip/stack/conntrack.go')
-rw-r--r-- | pkg/tcpip/stack/conntrack.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/stack/conntrack.go b/pkg/tcpip/stack/conntrack.go index cdb435644..3f083928f 100644 --- a/pkg/tcpip/stack/conntrack.go +++ b/pkg/tcpip/stack/conntrack.go @@ -407,12 +407,12 @@ func handlePacketOutput(pkt *PacketBuffer, conn *conn, gso *GSO, r *Route, dir d // Calculate the TCP checksum and set it. tcpHeader.SetChecksum(0) - length := uint16(len(tcpHeader) + pkt.Data.Size()) + length := uint16(len(tcpHeader) + pkt.Data().Size()) xsum := header.PseudoHeaderChecksum(header.TCPProtocolNumber, netHeader.SourceAddress(), netHeader.DestinationAddress(), length) if gso != nil && gso.NeedsCsum { tcpHeader.SetChecksum(xsum) } else if r.RequiresTXTransportChecksum() { - xsum = header.ChecksumVV(pkt.Data, xsum) + xsum = header.ChecksumCombine(xsum, pkt.Data().AsRange().Checksum()) tcpHeader.SetChecksum(^tcpHeader.CalculateChecksum(xsum)) } |