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/tcpip/transport/icmp | |
parent | 702553edddb87e4aa93a190840948539233f61fc (diff) | |
parent | 2e191cb3f72858c61943168a69b0aff0fda6ee45 (diff) |
Merge release-20201208.0-43-g2e191cb3f (automated)
Diffstat (limited to 'pkg/tcpip/transport/icmp')
-rw-r--r-- | pkg/tcpip/transport/icmp/endpoint.go | 22 | ||||
-rw-r--r-- | pkg/tcpip/transport/icmp/icmp_state_autogen.go | 11 |
2 files changed, 5 insertions, 28 deletions
diff --git a/pkg/tcpip/transport/icmp/endpoint.go b/pkg/tcpip/transport/icmp/endpoint.go index 80c01f2cb..74fe19e98 100644 --- a/pkg/tcpip/transport/icmp/endpoint.go +++ b/pkg/tcpip/transport/icmp/endpoint.go @@ -75,8 +75,6 @@ type endpoint struct { route *stack.Route `state:"manual"` ttl uint8 stats tcpip.TransportEndpointStats `state:"nosave"` - // linger is used for SO_LINGER socket option. - linger tcpip.LingerOption // owner is used to get uid and gid of the packet. owner tcpip.PacketOwner @@ -338,15 +336,6 @@ func (e *endpoint) Peek([][]byte) (int64, *tcpip.Error) { // SetSockOpt sets a socket option. func (e *endpoint) SetSockOpt(opt tcpip.SettableSocketOption) *tcpip.Error { - switch v := opt.(type) { - case *tcpip.SocketDetachFilterOption: - return nil - - case *tcpip.LingerOption: - e.mu.Lock() - e.linger = *v - e.mu.Unlock() - } return nil } @@ -399,16 +388,7 @@ func (e *endpoint) GetSockOptInt(opt tcpip.SockOptInt) (int, *tcpip.Error) { // GetSockOpt implements tcpip.Endpoint.GetSockOpt. func (e *endpoint) GetSockOpt(opt tcpip.GettableSocketOption) *tcpip.Error { - switch o := opt.(type) { - case *tcpip.LingerOption: - e.mu.Lock() - *o = e.linger - e.mu.Unlock() - return nil - - default: - return tcpip.ErrUnknownProtocolOption - } + return tcpip.ErrUnknownProtocolOption } func send4(r *stack.Route, ident uint16, data buffer.View, ttl uint8, owner tcpip.PacketOwner) *tcpip.Error { diff --git a/pkg/tcpip/transport/icmp/icmp_state_autogen.go b/pkg/tcpip/transport/icmp/icmp_state_autogen.go index 0fcfe0dd8..28a734f05 100644 --- a/pkg/tcpip/transport/icmp/icmp_state_autogen.go +++ b/pkg/tcpip/transport/icmp/icmp_state_autogen.go @@ -59,7 +59,6 @@ func (e *endpoint) StateFields() []string { "shutdownFlags", "state", "ttl", - "linger", "owner", "ops", } @@ -81,9 +80,8 @@ func (e *endpoint) StateSave(stateSinkObject state.Sink) { stateSinkObject.Save(10, &e.shutdownFlags) stateSinkObject.Save(11, &e.state) stateSinkObject.Save(12, &e.ttl) - stateSinkObject.Save(13, &e.linger) - stateSinkObject.Save(14, &e.owner) - stateSinkObject.Save(15, &e.ops) + stateSinkObject.Save(13, &e.owner) + stateSinkObject.Save(14, &e.ops) } func (e *endpoint) StateLoad(stateSourceObject state.Source) { @@ -99,9 +97,8 @@ func (e *endpoint) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(10, &e.shutdownFlags) stateSourceObject.Load(11, &e.state) stateSourceObject.Load(12, &e.ttl) - stateSourceObject.Load(13, &e.linger) - stateSourceObject.Load(14, &e.owner) - stateSourceObject.Load(15, &e.ops) + stateSourceObject.Load(13, &e.owner) + stateSourceObject.Load(14, &e.ops) stateSourceObject.LoadValue(6, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) }) stateSourceObject.AfterLoad(e.afterLoad) } |