diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-01-13 00:08:53 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-13 00:08:53 +0000 |
commit | 8f401a293863058bfc1225d03bfc90f48010c68c (patch) | |
tree | 516d3872f379d74eee21bb776be09da050497ceb /pkg/tcpip/transport/tcp/endpoint.go | |
parent | fbc3a3d984eb113f7487e38ba55e5f813fc72aec (diff) | |
parent | ad0ac73626c3d65712791eba652c05869ed287f8 (diff) |
Merge release-20201216.0-88-gad0ac7362 (automated)
Diffstat (limited to 'pkg/tcpip/transport/tcp/endpoint.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/endpoint.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go index 8f3981075..281f4cd58 100644 --- a/pkg/tcpip/transport/tcp/endpoint.go +++ b/pkg/tcpip/transport/tcp/endpoint.go @@ -508,6 +508,9 @@ type endpoint struct { // shutdownFlags represent the current shutdown state of the endpoint. shutdownFlags tcpip.ShutdownFlags + // tcpRecovery is the loss deteoction algorithm used by TCP. + tcpRecovery tcpip.TCPRecovery + // sackPermitted is set to true if the peer sends the TCPSACKPermitted // option in the SYN/SYN-ACK. sackPermitted bool @@ -918,6 +921,8 @@ func newEndpoint(s *stack.Stack, netProto tcpip.NetworkProtocolNumber, waiterQue e.maxSynRetries = uint8(synRetries) } + s.TransportProtocolOption(ProtocolNumber, &e.tcpRecovery) + if p := s.GetTCPProbe(); p != nil { e.probe = p } @@ -3072,7 +3077,7 @@ func (e *endpoint) completeState() stack.TCPEndpointState { } } - rc := e.snd.rc + rc := &e.snd.rc s.Sender.RACKState = stack.TCPRACKState{ XmitTime: rc.xmitTime, EndSequence: rc.endSequence, |