diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-02-10 06:00:13 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-10 06:00:13 +0000 |
commit | 549583ee9f2782807cc4144e64ff7db5fdb71b71 (patch) | |
tree | a090ea049868b6c4a923bf025c94bf807831c853 /pkg/sentry/socket/netstack | |
parent | d835625e374973f72e033e605aa1c3e0159aa850 (diff) | |
parent | 298c129cc151e197db35a927f9676cc40ec80d5c (diff) |
Merge release-20210201.0-72-g298c129cc (automated)
Diffstat (limited to 'pkg/sentry/socket/netstack')
-rw-r--r-- | pkg/sentry/socket/netstack/netstack.go | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/pkg/sentry/socket/netstack/netstack.go b/pkg/sentry/socket/netstack/netstack.go index 69693f263..cee8120ab 100644 --- a/pkg/sentry/socket/netstack/netstack.go +++ b/pkg/sentry/socket/netstack/netstack.go @@ -855,10 +855,7 @@ func getSockOptSocket(t *kernel.Task, s socket.SocketOps, ep commonEndpoint, fam return nil, syserr.ErrInvalidArgument } - size, err := ep.SocketOptions().GetSendBufferSize() - if err != nil { - return nil, syserr.TranslateNetstackError(err) - } + size := ep.SocketOptions().GetSendBufferSize() if size > math.MaxInt32 { size = math.MaxInt32 @@ -1647,13 +1644,6 @@ func setSockOptSocket(t *kernel.Task, s socket.SocketOps, ep commonEndpoint, nam return syserr.ErrInvalidArgument } - family, _, _ := s.Type() - // TODO(gvisor.dev/issue/5132): We currently do not support - // setting this option for unix sockets. - if family == linux.AF_UNIX { - return nil - } - v := usermem.ByteOrder.Uint32(optVal) ep.SocketOptions().SetSendBufferSize(int64(v), true) return nil |