diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-10-25 20:18:16 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-10-25 20:18:16 +0000 |
commit | e0b0ba4247a59a971f78f0ce89c47f972fe0e943 (patch) | |
tree | 8717f79d89c1b918c9e265289ecd318778faae43 /pkg/sentry/socket | |
parent | 6dfd0d8aa10dd28ff5c77b7a677779485858ebab (diff) | |
parent | 8f029b3f823342e43d23e2a238bc599596bdca24 (diff) |
Merge release-20190806.1-327-g8f029b3 (automated)
Diffstat (limited to 'pkg/sentry/socket')
-rwxr-xr-x | pkg/sentry/socket/netstack/netstack.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/sentry/socket/netstack/netstack.go b/pkg/sentry/socket/netstack/netstack.go index 69dbfd197..27c6692c4 100755 --- a/pkg/sentry/socket/netstack/netstack.go +++ b/pkg/sentry/socket/netstack/netstack.go @@ -281,7 +281,7 @@ type SocketOperations struct { // New creates a new endpoint socket. func New(t *kernel.Task, family int, skType linux.SockType, protocol int, queue *waiter.Queue, endpoint tcpip.Endpoint) (*fs.File, *syserr.Error) { if skType == linux.SOCK_STREAM { - if err := endpoint.SetSockOpt(tcpip.DelayOption(1)); err != nil { + if err := endpoint.SetSockOptInt(tcpip.DelayOption, 1); err != nil { return nil, syserr.TranslateNetstackError(err) } } @@ -1055,8 +1055,8 @@ func getSockOptTCP(t *kernel.Task, ep commonEndpoint, name, outLen int) (interfa return nil, syserr.ErrInvalidArgument } - var v tcpip.DelayOption - if err := ep.GetSockOpt(&v); err != nil { + v, err := ep.GetSockOptInt(tcpip.DelayOption) + if err != nil { return nil, syserr.TranslateNetstackError(err) } @@ -1497,11 +1497,11 @@ func setSockOptTCP(t *kernel.Task, ep commonEndpoint, name int, optVal []byte) * } v := usermem.ByteOrder.Uint32(optVal) - var o tcpip.DelayOption + var o int if v == 0 { o = 1 } - return syserr.TranslateNetstackError(ep.SetSockOpt(o)) + return syserr.TranslateNetstackError(ep.SetSockOptInt(tcpip.DelayOption, o)) case linux.TCP_CORK: if len(optVal) < sizeOfInt32 { |