From 9742daf3c201771d257c0d043347f4eebf3088e0 Mon Sep 17 00:00:00 2001 From: Eyal Soha Date: Mon, 3 Feb 2020 12:03:38 -0800 Subject: Add packetdrill tests that use docker. PiperOrigin-RevId: 292973224 --- test/packetdrill/fin_wait2_timeout.pkt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/packetdrill/fin_wait2_timeout.pkt (limited to 'test/packetdrill/fin_wait2_timeout.pkt') 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 ++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 -- cgit v1.2.3