summaryrefslogtreecommitdiffhomepage
path: root/test/packetdrill/fin_wait2_timeout.pkt
diff options
context:
space:
mode:
authorEyal Soha <eyalsoha@google.com>2020-02-03 12:03:38 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-03 12:04:22 -0800
commit9742daf3c201771d257c0d043347f4eebf3088e0 (patch)
treefbf56388cafe49a038cc2ac2b5c8e466a816b258 /test/packetdrill/fin_wait2_timeout.pkt
parent4d1a648c7c5db8a51416bff647260a1be3b5c12e (diff)
Add packetdrill tests that use docker.
PiperOrigin-RevId: 292973224
Diffstat (limited to 'test/packetdrill/fin_wait2_timeout.pkt')
-rw-r--r--test/packetdrill/fin_wait2_timeout.pkt23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/packetdrill/fin_wait2_timeout.pkt b/test/packetdrill/fin_wait2_timeout.pkt
new file mode 100644
index 000000000..613f0bec9
--- /dev/null
+++ b/test/packetdrill/fin_wait2_timeout.pkt
@@ -0,0 +1,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