mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix tcp_fin_retransmission_netstack_test
Netstack does not check ACK number for FIN-ACK packets and goes into TIMEWAIT unconditionally. Fixing the state machine will give us back the retransmission of FIN. PiperOrigin-RevId: 363301883
This commit is contained in:
@@ -260,7 +260,7 @@ func (r *receiver) consumeSegment(s *segment, segSeq seqnum.Value, segLen seqnum
|
||||
case StateEstablished:
|
||||
r.ep.setEndpointState(StateCloseWait)
|
||||
case StateFinWait1:
|
||||
if s.flagIsSet(header.TCPFlagAck) {
|
||||
if s.flagIsSet(header.TCPFlagAck) && s.ackNumber == r.ep.snd.sndNxt {
|
||||
// FIN-ACK, transition to TIME-WAIT.
|
||||
r.ep.setEndpointState(StateTimeWait)
|
||||
} else {
|
||||
|
||||
@@ -289,8 +289,6 @@ ALL_TESTS = [
|
||||
),
|
||||
PacketimpactTestInfo(
|
||||
name = "tcp_fin_retransmission",
|
||||
# TODO(b/181625316): Fix netstack then remove the line below.
|
||||
expect_netstack_failure = True,
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user