diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-09-16 22:10:02 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-16 22:10:02 +0000 |
commit | b332e676ad30b43851aa878d52586413afe3d299 (patch) | |
tree | 0162940eed68e9e900f17998665f36e09f1b8867 /pkg/sentry/socket/unix | |
parent | 4827225c3d228c936852c8f87da791e1c45331f1 (diff) | |
parent | b6d165fe98b908a7aa97e3fadd61ddd3731be915 (diff) |
Merge release-20200907.0-67-gb6d165fe9 (automated)
Diffstat (limited to 'pkg/sentry/socket/unix')
-rw-r--r-- | pkg/sentry/socket/unix/socket_refs.go | 5 | ||||
-rw-r--r-- | pkg/sentry/socket/unix/transport/queue_refs.go | 5 | ||||
-rw-r--r-- | pkg/sentry/socket/unix/transport/unix.go | 10 |
3 files changed, 14 insertions, 6 deletions
diff --git a/pkg/sentry/socket/unix/socket_refs.go b/pkg/sentry/socket/unix/socket_refs.go index 39aaedc7f..dababb85f 100644 --- a/pkg/sentry/socket/unix/socket_refs.go +++ b/pkg/sentry/socket/unix/socket_refs.go @@ -2,10 +2,11 @@ package unix import ( "fmt" - "gvisor.dev/gvisor/pkg/log" - refs_vfs1 "gvisor.dev/gvisor/pkg/refs" "runtime" "sync/atomic" + + "gvisor.dev/gvisor/pkg/log" + refs_vfs1 "gvisor.dev/gvisor/pkg/refs" ) // ownerType is used to customize logging. Note that we use a pointer to T so diff --git a/pkg/sentry/socket/unix/transport/queue_refs.go b/pkg/sentry/socket/unix/transport/queue_refs.go index 4c3dcd13f..0d4e34988 100644 --- a/pkg/sentry/socket/unix/transport/queue_refs.go +++ b/pkg/sentry/socket/unix/transport/queue_refs.go @@ -2,10 +2,11 @@ package transport import ( "fmt" - "gvisor.dev/gvisor/pkg/log" - refs_vfs1 "gvisor.dev/gvisor/pkg/refs" "runtime" "sync/atomic" + + "gvisor.dev/gvisor/pkg/log" + refs_vfs1 "gvisor.dev/gvisor/pkg/refs" ) // ownerType is used to customize logging. Note that we use a pointer to T so diff --git a/pkg/sentry/socket/unix/transport/unix.go b/pkg/sentry/socket/unix/transport/unix.go index cbbdd000f..08504560c 100644 --- a/pkg/sentry/socket/unix/transport/unix.go +++ b/pkg/sentry/socket/unix/transport/unix.go @@ -945,8 +945,14 @@ func (e *baseEndpoint) GetSockOptInt(opt tcpip.SockOptInt) (int, *tcpip.Error) { // GetSockOpt implements tcpip.Endpoint.GetSockOpt. func (e *baseEndpoint) GetSockOpt(opt tcpip.GettableSocketOption) *tcpip.Error { - log.Warningf("Unsupported socket option: %T", opt) - return tcpip.ErrUnknownProtocolOption + switch opt.(type) { + case *tcpip.LingerOption: + return nil + + default: + log.Warningf("Unsupported socket option: %T", opt) + return tcpip.ErrUnknownProtocolOption + } } // LastError implements Endpoint.LastError. |