gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/test/packetdrill/fin_wait2_timeout.pkt (about) 1 // Test that a socket in FIN_WAIT_2 eventually times out and a subsequent 2 // packet generates a RST. 3 4 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3 5 +0 bind(3, ..., ...) = 0 6 7 +0 listen(3, 1) = 0 8 9 // Establish a connection without timestamps. 10 +0 < S 0:0(0) win 32792 <mss 1460,sackOK,nop,nop,nop,wscale 7> 11 +0 > S. 0:0(0) ack 1 <...> 12 +0 < P. 1:1(0) ack 1 win 257 13 14 +0.100 accept(3, ..., ...) = 4 15 // set FIN_WAIT2 timeout to 1 seconds. 16 +0.100 setsockopt(4, SOL_TCP, TCP_LINGER2, [1], 4) = 0 17 +0 close(4) = 0 18 19 +0 > F. 1:1(0) ack 1 <...> 20 +0 < . 1:1(0) ack 2 win 257 21 22 +2 < . 1:1(0) ack 2 win 257 23 +0 > R 2:2(0) win 0