mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Do not process ACKs when endpoint is in error state.
PiperOrigin-RevId: 734333026
This commit is contained in:
committed by
gVisor bot
parent
e699298d58
commit
d01514263b
@@ -1317,8 +1317,12 @@ func (e *Endpoint) handleSegmentLocked(s *segment) (cont bool, err tcpip.Error)
|
||||
// Now check if the received segment has caused us to transition
|
||||
// to a CLOSED state, if yes then terminate processing and do
|
||||
// not invoke the sender.
|
||||
// It is also possible that the sender has sent a RST before
|
||||
// which got lost and didn't reach the other side. At that time,
|
||||
// we can still receive ACKs after the sender has purged the
|
||||
// write list. Do not process such ACKs and return immediately.
|
||||
state := e.EndpointState()
|
||||
if state == StateClose {
|
||||
if state == StateClose || state == StateError {
|
||||
// When we get into StateClose while processing from the queue,
|
||||
// return immediately and let the TCP processors handle it.
|
||||
return false, nil
|
||||
|
||||
Reference in New Issue
Block a user