From e697f25b164ff41f51c907c7aaae94f14fc1d31b Mon Sep 17 00:00:00 2001 From: Matthieu Baerts Date: Thu, 20 Oct 2022 11:31:47 +0200 Subject: [PATCH] mptcp: add_addr: new retry test without errors On very slow hosts, injected packets cause troubles because it reset timers in Packetdrill, see: https://github.com/multipath-tcp/mptcp_net-next/issues/312 Add a new "safer" version without these injected packets to monitor if everything is OK like that. Signed-off-by: Matthieu Baerts (cherry picked from commit 59cd5dd230e93ead9359477077463643b89913ec) Signed-off-by: Matthieu Baerts --- .../mptcp/add_addr/add_addr_retry_plain.pkt | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 gtests/net/mptcp/add_addr/add_addr_retry_plain.pkt diff --git a/gtests/net/mptcp/add_addr/add_addr_retry_plain.pkt b/gtests/net/mptcp/add_addr/add_addr_retry_plain.pkt new file mode 100644 index 00000000..57cf970f --- /dev/null +++ b/gtests/net/mptcp/add_addr/add_addr_retry_plain.pkt @@ -0,0 +1,34 @@ +// connection initiated by packetdrill +--tolerance_usecs=200000 +`../common/defaults.sh` + ++0 `sysctl -wq net.mptcp.add_addr_timeout=1` ++0 `../common/multi-ep.sh -e 1 -m signal` + ++0 socket(..., SOCK_STREAM, IPPROTO_MPTCP) = 3 ++0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 + ++0 bind(3, ..., ...) = 0 ++0 listen(3, 1) = 0 ++0 < S 0:0(0) win 32792 ++0 > S. 0:0(0) ack 1 ++0.01 < . 1:1(0) ack 1 win 257 ++0 accept(3, ..., ...) = 4 + +// ADD_ADDR is sent directly (>= 5.12), not after first data (< 5.12) ++0 > . 1:1(0) ack 1 + +// Retransmitted after one second ++1.0 > . 1:1(0) ack 1 ++1.0 > . 1:1(0) ack 1 + +// send echo with correct id, expect no retry ++0 < . 1:1(0) ack 1 win 257 + +// read and ack 1 data segment ++1.1 < P. 1:1001(1000) ack 1 win 450 ++0 > . 1:1(0) ack 1001 ++0.3 read(4, ..., 1000) = 1000 + ++0 close(4) = 0 ++0 > . 1:1(0) ack 1001