summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/socket/unix
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2020-09-16 15:05:20 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-16 15:06:55 -0700
commitb6d165fe98b908a7aa97e3fadd61ddd3731be915 (patch)
treed5786f0b57fdf0715c683d442466ecedfb5395cc /pkg/sentry/socket/unix
parent29ce0ad1603316b8a12102e23bfa5942acf63b14 (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.go10
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.