summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport
diff options
context:
space:
mode:
authorNayana Bidari <nybidari@google.com>2020-09-01 09:52:52 -0700
committerAndrei Vagin <avagin@gmail.com>2020-09-09 17:53:10 -0700
commitfcd85296f964c5965936039dfea7ed221d5bf68a (patch)
treedf55138b31ec89e7ae64cc3afcfbb6003df4b1d7 /pkg/tcpip/transport
parent08ab6cbdddb4149b6ee3e7d9c59698b5d7db2028 (diff)
Automated rollback of changelist 328350576
PiperOrigin-RevId: 329526153
Diffstat (limited to 'pkg/tcpip/transport')
-rw-r--r--pkg/tcpip/transport/tcp/endpoint.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/pkg/tcpip/transport/tcp/endpoint.go b/pkg/tcpip/transport/tcp/endpoint.go
index c5d9eba5d..3f18efeef 100644
--- a/pkg/tcpip/transport/tcp/endpoint.go
+++ b/pkg/tcpip/transport/tcp/endpoint.go
@@ -654,9 +654,6 @@ type endpoint struct {
// owner is used to get uid and gid of the packet.
owner tcpip.PacketOwner
-
- // linger is used for SO_LINGER socket option.
- linger tcpip.LingerOption
}
// UniqueID implements stack.TransportEndpoint.UniqueID.
@@ -1010,26 +1007,6 @@ func (e *endpoint) Close() {
return
}
- if e.linger.Enabled && e.linger.Timeout == 0 {
- s := e.EndpointState()
- isResetState := s == StateEstablished || s == StateCloseWait || s == StateFinWait1 || s == StateFinWait2 || s == StateSynRecv
- if isResetState {
- // Close the endpoint without doing full shutdown and
- // send a RST.
- e.resetConnectionLocked(tcpip.ErrConnectionAborted)
- e.closeNoShutdownLocked()
-
- // Wake up worker to close the endpoint.
- switch s {
- case StateSynRecv:
- e.notifyProtocolGoroutine(notifyClose)
- default:
- e.notifyProtocolGoroutine(notifyTickleWorker)
- }
- return
- }
- }
-
// Issue a shutdown so that the peer knows we won't send any more data
// if we're connected, or stop accepting if we're listening.
e.shutdownLocked(tcpip.ShutdownWrite | tcpip.ShutdownRead)
@@ -1830,11 +1807,6 @@ func (e *endpoint) SetSockOpt(opt tcpip.SettableSocketOption) *tcpip.Error {
case *tcpip.SocketDetachFilterOption:
return nil
- case *tcpip.LingerOption:
- e.LockUser()
- e.linger = *v
- e.UnlockUser()
-
default:
return nil
}
@@ -2057,11 +2029,6 @@ func (e *endpoint) GetSockOpt(opt tcpip.GettableSocketOption) *tcpip.Error {
Port: port,
}
- case *tcpip.LingerOption:
- e.LockUser()
- *o = e.linger
- e.UnlockUser()
-
default:
return tcpip.ErrUnknownProtocolOption
}