From 8cbd6153a69ae370a3c5d3795952a1de00f7436b Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Tue, 4 Dec 2018 13:14:22 -0800 Subject: Fix available calculation when merging TCP segments PiperOrigin-RevId: 224033418 Change-Id: I780be973e8be68ac93e8c9e7a100002e912f40d2 --- pkg/tcpip/transport/tcp/snd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/tcpip/transport') diff --git a/pkg/tcpip/transport/tcp/snd.go b/pkg/tcpip/transport/tcp/snd.go index b47e279fc..122c52f32 100644 --- a/pkg/tcpip/transport/tcp/snd.go +++ b/pkg/tcpip/transport/tcp/snd.go @@ -411,7 +411,7 @@ func (s *sender) sendData() { if seg.flags == 0 { // Merge segments if allowed. if seg.data.Size() != 0 { - available := int(seg.sequenceNumber.Size(end)) + available := int(s.sndNxt.Size(end)) if available > limit { available = limit } -- cgit v1.2.3