Skip to content

Commit

Permalink
mptcp: add explicit test for MPC with OoO pkts (server side)
Browse files Browse the repository at this point in the history
This explicitly cover the critical scenario triggering:

multipath-tcp/mptcp_net-next#192

and should fail till the kernel patch:

"mptcp: always parse mptcp options for MPC reqsk"

is merged

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Paolo Abeni committed May 17, 2021
1 parent 8cbd251 commit 5d13a7e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
20 changes: 20 additions & 0 deletions gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_ooo.pkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--tolerance_usecs=100000
`../common/defaults.sh`

+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 1000,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 < . 101:201(100) ack 1 win 257
+0 accept(3, ..., ...) = 4
+0.01 > . 1:1(0) ack 1 <nop,nop,sack 101:201>

+0 ... 0.1 read(4, ..., 1) = 1
// qui vorrei fare una read bloccante ?!?

+0.01 < . 1:2(1) ack 1 win 257
// questo causa fallback e crash

14 changes: 14 additions & 0 deletions gtests/net/mptcp/mp_capable/v1_mp_capable_bind_no_cs_ooo.pkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Test mp_capable mptcp option, first syn sent by packetdrill
--tolerance_usecs=100000
`../common/defaults.sh`

+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 1000, 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 < . 101:201(100) ack 1 win 257 <mpcapable v1 flags[flag_h] key[ckey=2, skey] mpcdatalen 200, nop, nop>
+0 > . 1:1(0) ack 1 <nop, nop, sack 101:201, dss dack4=1 nocs>

0 comments on commit 5d13a7e

Please sign in to comment.