diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-01-27 02:19:18 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-27 02:19:18 +0000 |
commit | 14ee229ad6f1eb8c465dab899ffe4ba8a903c63f (patch) | |
tree | 6dd19bbc90c3fe64843673b889c1fdaa39720a06 /pkg/tcpip/transport/packet | |
parent | 361ef9f80f978727027a2a8d7c4ccc32a8536bd1 (diff) | |
parent | 8e660447410117edd49f41f7aa758e49254ae2d5 (diff) |
Merge release-20210112.0-98-g8e6604474 (automated)
Diffstat (limited to 'pkg/tcpip/transport/packet')
-rw-r--r-- | pkg/tcpip/transport/packet/endpoint.go | 4 | ||||
-rw-r--r-- | pkg/tcpip/transport/packet/endpoint_state.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/transport/packet/endpoint.go b/pkg/tcpip/transport/packet/endpoint.go index 9ca9c9780..d48877677 100644 --- a/pkg/tcpip/transport/packet/endpoint.go +++ b/pkg/tcpip/transport/packet/endpoint.go @@ -105,12 +105,12 @@ func NewEndpoint(s *stack.Stack, cooked bool, netProto tcpip.NetworkProtocolNumb waiterQueue: waiterQueue, rcvBufSizeMax: 32 * 1024, } - ep.ops.InitHandler(ep, ep.stack) + ep.ops.InitHandler(ep, ep.stack, tcpip.GetStackSendBufferLimits) // Override with stack defaults. var ss tcpip.SendBufferSizeOption if err := s.Option(&ss); err == nil { - ep.ops.SetSendBufferSize(int64(ss.Default), false /* notify */, tcpip.GetStackSendBufferLimits) + ep.ops.SetSendBufferSize(int64(ss.Default), false /* notify */) } var rs stack.ReceiveBufferSizeOption diff --git a/pkg/tcpip/transport/packet/endpoint_state.go b/pkg/tcpip/transport/packet/endpoint_state.go index 61221be71..4d98fb051 100644 --- a/pkg/tcpip/transport/packet/endpoint_state.go +++ b/pkg/tcpip/transport/packet/endpoint_state.go @@ -64,7 +64,7 @@ func (ep *endpoint) loadRcvBufSizeMax(max int) { // afterLoad is invoked by stateify. func (ep *endpoint) afterLoad() { ep.stack = stack.StackFromEnv - ep.ops.InitHandler(ep, ep.stack) + ep.ops.InitHandler(ep, ep.stack, tcpip.GetStackSendBufferLimits) // TODO(gvisor.dev/173): Once bind is supported, choose the right NIC. if err := ep.stack.RegisterPacketEndpoint(0, ep.netProto, ep); err != nil { |