forked from google/packetdrill
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request google#56 from dcaratti/add-addr-retry
add coverage for ADD_ADDR retransmission
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, dss dack4=1 ssn=1 dll=0 nocs> | ||
// send echo with wrong address, expect a retry in 1s | ||
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=1 addr[ep=inet_addr("1.2.3.4")] addr_echo, dss dack4=1 ssn=1 dll=0 nocs> | ||
+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto, dss dack4=1 ssn=1 dll=0 nocs> | ||
// send echo with wrong id, expect a retry in 1s | ||
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=90 addr[saddr0] addr_echo> | ||
+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto, dss dack4=1 ssn=1 dll=0 nocs> | ||
// 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
// send echo with wrong address, expect a retry in 1s | ||
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=1 addr[ep=inet6_addr("2001:db8::c1a0")] addr_echo> | ||
+1.0 > . 1:1(0) ack 1 <add_address address_id=1 addr[saddr0] hmac=auto> | ||
// send echo with wrong id, expect a retry in 1s | ||
+0 < . 1:1(0) ack 1 win 257 <add_address address_id=90 addr[saddr0] addr_echo> | ||
+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> |