Skip to content

Commit 6ba9559

Browse files
committed
fix receiving bytes outside advertised receive window test
1 parent 8c37d08 commit 6ba9559

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/socket/tcp.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6864,8 +6864,7 @@ mod test {
68646864
s.recv_slice(&mut [0; 1]).unwrap();
68656865
recv_nothing!(s);
68666866

6867-
// Now, if the remote wants to send one byte outside of the receive window that we
6868-
// previously advertised, it should not succeed.
6867+
// Send 1 byte outside of the advertised received window. No ACK is sent due to ACK delay.
68696868
send!(
68706869
s,
68716870
TcpRepr {
@@ -6876,8 +6875,13 @@ mod test {
68766875
..SEND_TEMPL
68776876
}
68786877
);
6878+
6879+
recv_nothing!(s);
6880+
6881+
// When ACK delay expries, previously sent byte should not be accepted.
68796882
recv!(
68806883
s,
6884+
time 10,
68816885
Ok(TcpRepr {
68826886
seq_number: LOCAL_SEQ + 1,
68836887
ack_number: Some(REMOTE_SEQ + 65),

0 commit comments

Comments
 (0)