summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp/connect.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2018-11-05 15:38:32 -0800
committerShentubot <shentubot@google.com>2018-11-05 15:39:30 -0800
commit37cbce1f9156109a58ae3d350f8e0e9d027b3785 (patch)
treea76b631fd031c1f348562cc9b3a2275b43fb1556 /pkg/tcpip/transport/tcp/connect.go
parent704b56a40d0a041a4e6f814c3dbb1f9ec15f9002 (diff)
Merge segments in sender's writeList
PiperOrigin-RevId: 220185891 Change-Id: Iaea73fd7b2fa8c399b989cdcaabf4885f370df4b
Diffstat (limited to 'pkg/tcpip/transport/tcp/connect.go')
-rw-r--r--pkg/tcpip/transport/tcp/connect.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go
index 965779a68..00cb39560 100644
--- a/pkg/tcpip/transport/tcp/connect.go
+++ b/pkg/tcpip/transport/tcp/connect.go
@@ -596,9 +596,7 @@ func sendTCP(r *stack.Route, id stack.TransportEndpointID, data buffer.Vectorise
if r.Capabilities()&stack.CapabilityChecksumOffload == 0 {
length := uint16(hdr.UsedLength() + data.Size())
xsum := r.PseudoHeaderChecksum(ProtocolNumber)
- for _, v := range data.Views() {
- xsum = header.Checksum(v, xsum)
- }
+ xsum = header.ChecksumVV(data, xsum)
tcp.SetChecksum(^tcp.CalculateChecksum(xsum, length))
}