summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-07-08 18:40:04 +0000
committergVisor bot <gvisor-bot@google.com>2021-07-08 18:40:04 +0000
commit06306070a572f8756ee3f8f01a5d0b534b1d1171 (patch)
treef503e8e406e7c43ee92f7c283dcea248c552b78c /pkg/tcpip/transport
parentd4e5be7022aeaf1a87d997a70e13c45baf9725cf (diff)
parent1fc7a9eac2f27053ed4ca138c6568b14ef520648 (diff)
Merge release-20210628.0-28-g1fc7a9eac (automated)
Diffstat (limited to 'pkg/tcpip/transport')
-rw-r--r--pkg/tcpip/transport/tcp/endpoint.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go
index 1ed4ba419..9945fdd6b 100644
--- a/pkg/tcpip/transport/tcp/endpoint.go
+++ b/pkg/tcpip/transport/tcp/endpoint.go
@@ -1530,6 +1530,12 @@ func (e *endpoint) queueSegment(p tcpip.Payloader, opts tcpip.WriteOptions) (*se
if err != nil {
return nil, 0, err
}
+
+ // Do not queue zero length segments.
+ if len(v) == 0 {
+ return nil, 0, nil
+ }
+
if !opts.Atomic {
// Since we released locks in between it's possible that the
// endpoint transitioned to a CLOSED/ERROR states so make