Skip to content

Commit 3fa5f5f

Browse files
JiaHuanngvisor-bot
authored andcommitted
netstack: remove timed-out endpoints from pendingEndpoints queue.
When a handshake times out, the endpoint may remain stuck in the lEP's pendingEndpoints queue. Related to #11536 It has passed the test-case for `//pkg/tcpip:tcpip_test` <img width="914" alt="image" src="https://github.com/user-attachments/assets/20247fc6-1e25-4994-ba09-3f917cd761c2" /> FUTURE_COPYBARA_INTEGRATE_REVIEW=#11557 from JiaHuann:master e22e7c4 PiperOrigin-RevId: 770265449
1 parent 2e9ad00 commit 3fa5f5f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/tcpip/transport/tcp/endpoint.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,14 @@ func (e *Endpoint) cleanupLocked() {
11981198
e.timeWaitTimer.Stop()
11991199
}
12001200

1201+
// Remove current EP from its lEP acceptQueue.pendingEndpoint if exists.
1202+
if e.h != nil && e.h.listenEP != nil {
1203+
lEP := e.h.listenEP
1204+
lEP.acceptMu.Lock()
1205+
delete(lEP.acceptQueue.pendingEndpoints, e)
1206+
lEP.acceptMu.Unlock()
1207+
}
1208+
12011209
// Close all endpoints that might have been accepted by TCP but not by
12021210
// the client.
12031211
e.closePendingAcceptableConnectionsLocked()

0 commit comments

Comments
 (0)