Skip to content

Commit

Permalink
mptcp: add_addr: new retry test without errors
Browse files Browse the repository at this point in the history
On very slow hosts, injected packets cause troubles because it reset
timers in Packetdrill, see:

  multipath-tcp/mptcp_net-next#312

Add a new "safer" version without these injected packets to monitor if
everything is OK like that.

Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
(cherry picked from commit 59cd5dd)
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
  • Loading branch information
matttbe committed Nov 7, 2022
1 parent 121699f commit e697f25
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions gtests/net/mptcp/add_addr/add_addr_retry_plain.pkt
Original file line number Diff line number Diff line change
@@ -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 <mss 1460, sackOK, nop, nop, nop, wscale 7, mpcapable v1 flags[flag_h] nokey>
+0 > S. 0:0(0) ack 1 <mss 1460, nop, nop, sackOK, nop, wscale 8, mpcapable v1 flags[flag_h] key[skey]>
+0.01 < . 1:1(0) ack 1 win 257 <mpcapable v1 flags[flag_h] key[ckey=2, skey]>
+0 accept(3, ..., ...) = 4

// ADD_ADDR is sent directly (>= 5.12), not after first data (< 5.12)
+0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>

// Retransmitted after one second
+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>
+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto>

// send echo with correct id, expect no retry
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=1 addr[saddr0] addr_echo>

// read and ack 1 data segment
+1.1 < P. 1:1001(1000) ack 1 win 450 <nop, nop, dss dack8=1 dsn8=1 ssn=1 dll=1000 nocs>
+0 > . 1:1(0) ack 1001 <dss dack8=1001 ssn=1 dll=0 nocs>
+0.3 read(4, ..., 1000) = 1000

+0 close(4) = 0
+0 > . 1:1(0) ack 1001 <dss dack8=1001 dsn8=1 ssn=0 dll=1 nocs fin, nop, nop>

0 comments on commit e697f25

Please sign in to comment.