diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-12-14 20:11:32 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-14 20:11:32 +0000 |
commit | 22ae84e87a245ca815d04548b1f3ca6ae5f07af2 (patch) | |
tree | 77e7ba1afc34cb67cbf2ab3ed11ab9f612111bb5 /pkg/sentry/socket/unix | |
parent | 702553edddb87e4aa93a190840948539233f61fc (diff) | |
parent | 2e191cb3f72858c61943168a69b0aff0fda6ee45 (diff) |
Merge release-20201208.0-43-g2e191cb3f (automated)
Diffstat (limited to 'pkg/sentry/socket/unix')
-rw-r--r-- | pkg/sentry/socket/unix/transport/transport_state_autogen.go | 7 | ||||
-rw-r--r-- | pkg/sentry/socket/unix/transport/unix.go | 22 |
2 files changed, 4 insertions, 25 deletions
diff --git a/pkg/sentry/socket/unix/transport/transport_state_autogen.go b/pkg/sentry/socket/unix/transport/transport_state_autogen.go index 06d6e3c21..2aeff0256 100644 --- a/pkg/sentry/socket/unix/transport/transport_state_autogen.go +++ b/pkg/sentry/socket/unix/transport/transport_state_autogen.go @@ -333,7 +333,6 @@ func (e *baseEndpoint) StateFields() []string { "receiver", "connected", "path", - "linger", "ops", } } @@ -347,8 +346,7 @@ func (e *baseEndpoint) StateSave(stateSinkObject state.Sink) { stateSinkObject.Save(2, &e.receiver) stateSinkObject.Save(3, &e.connected) stateSinkObject.Save(4, &e.path) - stateSinkObject.Save(5, &e.linger) - stateSinkObject.Save(6, &e.ops) + stateSinkObject.Save(5, &e.ops) } func (e *baseEndpoint) afterLoad() {} @@ -359,8 +357,7 @@ func (e *baseEndpoint) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(2, &e.receiver) stateSourceObject.Load(3, &e.connected) stateSourceObject.Load(4, &e.path) - stateSourceObject.Load(5, &e.linger) - stateSourceObject.Load(6, &e.ops) + stateSourceObject.Load(5, &e.ops) } func init() { diff --git a/pkg/sentry/socket/unix/transport/unix.go b/pkg/sentry/socket/unix/transport/unix.go index 0247e93fa..099a56281 100644 --- a/pkg/sentry/socket/unix/transport/unix.go +++ b/pkg/sentry/socket/unix/transport/unix.go @@ -746,9 +746,6 @@ type baseEndpoint struct { // or may be used if the endpoint is connected. path string - // linger is used for SO_LINGER socket option. - linger tcpip.LingerOption - // ops is used to get socket level options. ops tcpip.SocketOptions } @@ -840,12 +837,6 @@ func (e *baseEndpoint) SendMsg(ctx context.Context, data [][]byte, c ControlMess // SetSockOpt sets a socket option. func (e *baseEndpoint) SetSockOpt(opt tcpip.SettableSocketOption) *tcpip.Error { - switch v := opt.(type) { - case *tcpip.LingerOption: - e.Lock() - e.linger = *v - e.Unlock() - } return nil } @@ -922,17 +913,8 @@ func (e *baseEndpoint) GetSockOptInt(opt tcpip.SockOptInt) (int, *tcpip.Error) { // GetSockOpt implements tcpip.Endpoint.GetSockOpt. func (e *baseEndpoint) GetSockOpt(opt tcpip.GettableSocketOption) *tcpip.Error { - switch o := opt.(type) { - case *tcpip.LingerOption: - e.Lock() - *o = e.linger - e.Unlock() - return nil - - default: - log.Warningf("Unsupported socket option: %T", opt) - return tcpip.ErrUnknownProtocolOption - } + log.Warningf("Unsupported socket option: %T", opt) + return tcpip.ErrUnknownProtocolOption } // LastError implements Endpoint.LastError. |