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