summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/tcp
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-03-24 16:44:16 +0000
committergVisor bot <gvisor-bot@google.com>2021-03-24 16:44:16 +0000
commit9662600f3fc56cfce16d9cf407964b0bac0cc150 (patch)
tree93599a797cef7ecc2d7b019b9cd84823aaae5cc3 /pkg/tcpip/transport/tcp
parent15bcc00b79decbc781d2d1badd5c654ed2609ea8 (diff)
parentec0aa657edfd98a1e8dfbbf017ee6cf8c7f1a40e (diff)
Merge release-20210315.0-21-gec0aa657e (automated)
Diffstat (limited to 'pkg/tcpip/transport/tcp')
-rw-r--r--pkg/tcpip/transport/tcp/connect.go2
-rw-r--r--pkg/tcpip/transport/tcp/endpoint.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go
index 3404af6bb..b32fe2fb1 100644
--- a/pkg/tcpip/transport/tcp/connect.go
+++ b/pkg/tcpip/transport/tcp/connect.go
@@ -811,7 +811,7 @@ func sendTCP(r *stack.Route, tf tcpFields, data buffer.VectorisedView, gso *stac
tf.rcvWnd = math.MaxUint16
}
- if r.Loop&stack.PacketLoop == 0 && gso != nil && gso.Type == stack.GSOSW && int(gso.MSS) < data.Size() {
+ if r.Loop()&stack.PacketLoop == 0 && gso != nil && gso.Type == stack.GSOSW && int(gso.MSS) < data.Size() {
return sendTCPBatch(r, tf, data, gso, owner)
}
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go
index 43d344350..0a5e9cbb4 100644
--- a/pkg/tcpip/transport/tcp/endpoint.go
+++ b/pkg/tcpip/transport/tcp/endpoint.go
@@ -2211,8 +2211,8 @@ func (e *endpoint) connect(addr tcpip.FullAddress, handshake bool, run bool) tcp
defer r.Release()
netProtos := []tcpip.NetworkProtocolNumber{netProto}
- e.ID.LocalAddress = r.LocalAddress
- e.ID.RemoteAddress = r.RemoteAddress
+ e.ID.LocalAddress = r.LocalAddress()
+ e.ID.RemoteAddress = r.RemoteAddress()
e.ID.RemotePort = addr.Port
if e.ID.LocalPort != 0 {
@@ -3102,7 +3102,7 @@ func (e *endpoint) completeState() stack.TCPEndpointState {
func (e *endpoint) initHardwareGSO() {
gso := &stack.GSO{}
- switch e.route.NetProto {
+ switch e.route.NetProto() {
case header.IPv4ProtocolNumber:
gso.Type = stack.GSOTCPv4
gso.L3HdrLen = header.IPv4MinimumSize