summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorMithun Iyer <iyerm@google.com>2020-05-29 12:27:55 -0700
committergVisor bot <gvisor-bot@google.com>2020-05-29 12:33:28 -0700
commit089c88f2e87fb14cead02caea7f9dba0a5957395 (patch)
tree7c156a7eb5457da52b244f92bcacff0a013c727d /pkg
parentccf69bdd7e05a4e5f404fbef89a7f49f218645e2 (diff)
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
Diffstat (limited to 'pkg')
-rw-r--r--pkg/tcpip/transport/tcp/connect.go1
1 files changed, 1 insertions, 0 deletions
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