Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MP_PRIO smoketest #39

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions gtests/net/mptcp/mp_prio/mp_prio_server_v4.pkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
--tolerance_usecs=100000
`../common/defaults.sh`

+0 `../common/server.sh`

+0.0 socket(..., SOCK_STREAM, IPPROTO_MPTCP) = 3
+0.0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
+0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
+0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0

+0 bind(3, ..., ...) = 0
+0 listen(3, 1) = 0

+0.0 < addr[caddr0] > addr[saddr0] S 0:0(0) win 65535 <mss 1460,sackOK,TS val 4074410674 ecr 0,nop,wscale 8,mpcapable v1 flags[flag_h] nokey>
+0.0 > S. 0:0(0) ack 1 <mss 1460,sackOK,TS val 4074410674 ecr 4074410674,nop,wscale 8,mpcapable v1 flags[flag_h] key[skey]>
+0.0 < . 1:1(0) ack 1 win 256 <nop,nop,TS val 4074410674 ecr 4074410674,mpcapable v1 flags[flag_h] key[ckey=2,skey]>
+0 accept(3, ..., ...) = 4

// add_addr
+0.0 > . 1:1(0) ack 1 <nop,nop,TS val 4074418293 ecr 4074418292,add_address addr[saddr1] hmac=auto,dss dack4=1 dll=0 nocs>
// TODO: send echo bit
// +0.0 > . 1:1(0) ack 1 <nop,nop,TS val 4074418293 ecr 4074418292,add_address addr[saddr1],dss dack8=1 dll=0 nocs>

+0.2 < P. 1:3(2) ack 1 win 256 <nop,nop,TS val 4074418292 ecr 4074410674,mpcapable v1 flags[flag_h] key[skey,ckey] mpcdatalen 2,nop,nop>
// MP_CAPABLE carrying data are acked with 64-bit, safer not knowing if the
// sender will use a DSN on 64-bit or 32-bit. Later we can use the lower 32 bits
+0.0 > . 1:1(0) ack 3 <nop,nop,TS val 4074418293 ecr 4074418292,dss dack8=3 dll=0 nocs>
+0.0 read(4, ..., 2) = 2

// more inbound data and MP_PRIO to flip active -> backup
+0.0 < P. 3:5(2) ack 1 win 256 <dss dack8=1 dsn4=3 ssn=3 dll=2 nocs, mp_prio backup=1, nop, nop, nop>
+0.0 > . 1:1(0) ack 5 <nop,nop,TS val 4074418293 ecr 4074418292,dss dack4=5 nocs>
+0.0 read(4, ..., 2) = 2

// create subflow
+0.0 < addr[caddr1] > addr[saddr1] S 0:0(0) win 65535 <mss 1460,sackOK,TS val 448955294 ecr 0,nop,wscale 8,mp_join_syn backup=1 address_id=2 token=sha256_32(skey)>
+0.0 > S. 0:0(0) ack 1 <mss 1460,sackOK,TS val 448955294 ecr 448955294,nop,wscale 8,mp_join_syn_ack backup=1 address_id=0 sender_hmac=auto>
+0.0 < . 1:1(0) ack 1 win 256 <nop,nop,TS val 448955294 ecr 448955294,mp_join_ack sender_hmac=auto>
+0.0 > . 1:1(0) ack 1 <nop,nop,TS val 448955294 ecr 448955294,dss dack4=5 nocs>

// more inbound data and MP_PRIO to flip backup -> active
+0.0 < P. 1:11(10) ack 1 win 256 <dss dack8=1 dsn4=5 ssn=1 dll=10 nocs, mp_prio backup=0, nop, nop, nop>
+0.0 > . 1:1(0) ack 11 <nop,nop,TS val 448955294 ecr 448955294,dss dack4=15 nocs>
+0.0 read(4, ..., 10) = 10

// write() should now go through joined subflow
+0.0 write(4, ..., 100) = 100
+0.0 > addr[saddr1] > addr[caddr1] P. 1:101(100) ack 11 <nop,nop,TS val 448955294 ecr 448955294,dss dack4=15 dsn8=1 ssn=1 dll=100 nocs, nop, nop>
// silently refuse v0 mp_prio
+0.0 < addr[caddr1] > addr[saddr1] . 11:11(0) ack 101 win 256 <dss dack8=101 nocs, mp_prio backup=1 address_id=1>
+0.0 write(4, ..., 100) = 100
+0.0 > addr[saddr1] > addr[caddr1] P. 101:201(100) ack 11 <nop,nop,TS val 448955294 ecr 448955294,dss dack4=15 dsn8=101 ssn=101 dll=100 nocs, nop, nop>
+0.0 < addr[caddr1] > addr[saddr1] . 11:11(0) ack 201 win 256 <dss dack8=201 nocs>

// client sends DATA-FIN, subflows ack it
+0.0 < addr[caddr1] > addr[saddr1] . 11:11(0) ack 201 win 256 <dss dack8=201 dsn8=15 dll=1 nocs fin, nop, nop>
+0.0 > addr[saddr0] > addr[caddr0] . 1:1(0) ack 5 <nop,nop,TS val 448955294 ecr 448955294,dss dack4=16 nocs>
+0.0 > addr[saddr1] > addr[caddr1] . 201:201(0) ack 11 <nop,nop,TS val 448955294 ecr 448955294,dss dack4=16 nocs>