From b6d165fe98b908a7aa97e3fadd61ddd3731be915 Mon Sep 17 00:00:00 2001 From: Nayana Bidari Date: Wed, 16 Sep 2020 15:05:20 -0700 Subject: Automated rollback of changelist 329526153 PiperOrigin-RevId: 332097286 --- pkg/sentry/socket/unix/transport/unix.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pkg/sentry/socket/unix') 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. -- cgit v1.2.3