summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport/raw/endpoint.go
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2021-01-26 18:02:53 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-26 18:05:29 -0800
commit8e660447410117edd49f41f7aa758e49254ae2d5 (patch)
treef6e683059d5fdb671b79d3bfdd09a1d6769d1da9 /pkg/tcpip/transport/raw/endpoint.go
parent8bb7d61bdca59b98761b198ec258a6d77441c7ed (diff)
Initialize the send buffer handler in endpoint creation.
- This CL will initialize the function handler used for getting the send buffer size limits during endpoint creation and does not require the caller of SetSendBufferSize(..) to know the endpoint type(tcp/udp/..) PiperOrigin-RevId: 353992634
Diffstat (limited to 'pkg/tcpip/transport/raw/endpoint.go')
-rw-r--r--pkg/tcpip/transport/raw/endpoint.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/transport/raw/endpoint.go b/pkg/tcpip/transport/raw/endpoint.go
index 30644e92d..6c6d45188 100644
--- a/pkg/tcpip/transport/raw/endpoint.go
+++ b/pkg/tcpip/transport/raw/endpoint.go
@@ -112,14 +112,14 @@ func newEndpoint(s *stack.Stack, netProto tcpip.NetworkProtocolNumber, transProt
rcvBufSizeMax: 32 * 1024,
associated: associated,
}
- e.ops.InitHandler(e, e.stack)
+ e.ops.InitHandler(e, e.stack, tcpip.GetStackSendBufferLimits)
e.ops.SetHeaderIncluded(!associated)
- e.ops.SetSendBufferSize(32*1024, false /* notify */, tcpip.GetStackSendBufferLimits)
+ e.ops.SetSendBufferSize(32*1024, false /* notify */)
// Override with stack defaults.
var ss tcpip.SendBufferSizeOption
if err := s.Option(&ss); err == nil {
- e.ops.SetSendBufferSize(int64(ss.Default), false /* notify */, tcpip.GetStackSendBufferLimits)
+ e.ops.SetSendBufferSize(int64(ss.Default), false /* notify */)
}
var rs stack.ReceiveBufferSizeOption