From 089c88f2e87fb14cead02caea7f9dba0a5957395 Mon Sep 17 00:00:00 2001 From: Mithun Iyer Date: Fri, 29 May 2020 12:27:55 -0700 Subject: Move TCP to CLOSED from SYN-RCVD on RST. RST handling is broken when the TCP state transitions from SYN-SENT to SYN-RCVD in case of simultaneous open. An incoming RST should trigger cleanup of the endpoint. RFC793, section 3.9, page 70. Fixes #2814 PiperOrigin-RevId: 313828777 --- pkg/tcpip/transport/tcp/connect.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/tcpip') diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go index a7e088d4e..e4a06c9e1 100644 --- a/pkg/tcpip/transport/tcp/connect.go +++ b/pkg/tcpip/transport/tcp/connect.go @@ -1347,6 +1347,7 @@ func (e *endpoint) protocolMainLoop(handshake bool, wakerInitDone chan<- struct{ e.setEndpointState(StateError) e.HardError = err + e.workerCleanup = true // Lock released below. epilogue() return err -- cgit v1.2.3