From 3fff4c4a0fbb1b132348d4b82f61cc38a4cc6cb2 Mon Sep 17 00:00:00 2001 From: Nayana Bidari Date: Tue, 20 Apr 2021 09:30:57 -0700 Subject: Move SO_RCVBUF to socketops. Fixes #2926, #674 PiperOrigin-RevId: 369457123 --- pkg/tcpip/transport/tcp/testing/context/context.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pkg/tcpip/transport/tcp/testing') diff --git a/pkg/tcpip/transport/tcp/testing/context/context.go b/pkg/tcpip/transport/tcp/testing/context/context.go index e73f90bb0..7578d64ec 100644 --- a/pkg/tcpip/transport/tcp/testing/context/context.go +++ b/pkg/tcpip/transport/tcp/testing/context/context.go @@ -757,9 +757,7 @@ func (c *Context) Create(epRcvBuf int) { } if epRcvBuf != -1 { - if err := c.EP.SetSockOptInt(tcpip.ReceiveBufferSizeOption, epRcvBuf); err != nil { - c.t.Fatalf("SetSockOpt failed failed: %v", err) - } + c.EP.SocketOptions().SetReceiveBufferSize(int64(epRcvBuf), true /* notify */) } } -- cgit v1.2.3