From 70bd9c36c96faadc09b6cf3661dbe0ae2c91a66d Mon Sep 17 00:00:00 2001 From: Matthieu Baerts Date: Thu, 20 Oct 2022 10:28:12 +0200 Subject: [PATCH] mptcp: add_addr: merge 'retry' v4 and v6 The only difference was the injected and faulty ADD_ADDR: if it is faulty, it doesn't really matter if it is in v4 or v6, the main point is to send an ADD_ADDR with the wrong IP. While at it, also add 'errors' in the name in preparation to other 'retry' scenarios. Signed-off-by: Matthieu Baerts --- ...retry_v6.pkt => add_addr_retry_errors.pkt} | 2 +- .../net/mptcp/add_addr/add_addr_retry_v4.pkt | 34 ------------------- 2 files changed, 1 insertion(+), 35 deletions(-) rename gtests/net/mptcp/add_addr/{add_addr_retry_v6.pkt => add_addr_retry_errors.pkt} (96%) delete mode 100644 gtests/net/mptcp/add_addr/add_addr_retry_v4.pkt diff --git a/gtests/net/mptcp/add_addr/add_addr_retry_v6.pkt b/gtests/net/mptcp/add_addr/add_addr_retry_errors.pkt similarity index 96% rename from gtests/net/mptcp/add_addr/add_addr_retry_v6.pkt rename to gtests/net/mptcp/add_addr/add_addr_retry_errors.pkt index a084c338..b16126a7 100644 --- a/gtests/net/mptcp/add_addr/add_addr_retry_v6.pkt +++ b/gtests/net/mptcp/add_addr/add_addr_retry_errors.pkt @@ -18,7 +18,7 @@ // ADD_ADDR is sent directly (>= 5.12), not after first data (< 5.12) +0 > . 1:1(0) ack 1 // send echo with wrong address, expect a retry in 1s -+0 < . 1:1(0) ack 1 win 257 ++0 < . 1:1(0) ack 1 win 257 +1.0 > . 1:1(0) ack 1 // send echo with wrong id, expect a retry in 1s +0 < . 1:1(0) ack 1 win 257 diff --git a/gtests/net/mptcp/add_addr/add_addr_retry_v4.pkt b/gtests/net/mptcp/add_addr/add_addr_retry_v4.pkt deleted file mode 100644 index 286402e5..00000000 --- a/gtests/net/mptcp/add_addr/add_addr_retry_v4.pkt +++ /dev/null @@ -1,34 +0,0 @@ -// 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 -// send echo with wrong address, expect a retry in 1s -+0 < . 1:1(0) ack 1 win 257 -+1.0 > . 1:1(0) ack 1 -// send echo with wrong id, expect a retry in 1s -+0 < . 1:1(0) ack 1 win 257 -+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