github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/test/packetdrill/accept_ack_drop.pkt (about) 1 // Test that the accept works if the final ACK is dropped and an ack with data 2 // follows the dropped ack. 3 4 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 5 +0 bind(3, ..., ...) = 0 6 7 // Set backlog to 1 so that we can easily test. 8 +0 listen(3, 1) = 0 9 10 // Establish a connection without timestamps. 11 +0.0 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7> 12 +0.0 > S. 0:0(0) ack 1 <...> 13 14 +0.0 < . 1:5(4) ack 1 win 257 15 +0.0 > . 1:1(0) ack 5 <...> 16 17 // This should cause connection to transition to connected state. 18 +0.000 accept(3, ..., ...) = 4 19 +0.000 fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK) = 0 20 21 // Now read the data and we should get 4 bytes. 22 +0.000 read(4,..., 4) = 4 23 +0.000 close(4) = 0 24 25 +0.0 > F. 1:1(0) ack 5 <...> 26 +0.0 < F. 5:5(0) ack 2 win 257 27 +0.01 > . 2:2(0) ack 6 <...>