diff options
author | Nayana Bidari <nybidari@google.com> | 2020-09-16 15:05:20 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-16 15:06:55 -0700 |
commit | b6d165fe98b908a7aa97e3fadd61ddd3731be915 (patch) | |
tree | d5786f0b57fdf0715c683d442466ecedfb5395cc /pkg/sentry/socket/unix | |
parent | 29ce0ad1603316b8a12102e23bfa5942acf63b14 (diff) |
Automated rollback of changelist 329526153
PiperOrigin-RevId: 332097286
Diffstat (limited to 'pkg/sentry/socket/unix')
-rw-r--r-- | pkg/sentry/socket/unix/transport/unix.go | 10 |
1 files changed, 8 insertions, 2 deletions
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. |