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.
add fallback to TCP tests (server side)
test fallback to TCP in the following conditions: - client sends a v0 SYN (might trigger false postitive when testing v0 kernel) - client sends a SYN with mp_capable flag 'B' set - client sends a SYN with mp_capable flag 'H' unset - client flips version to v0 in the 3rd ACK - client flips mp_capable flag 'B' in the 3rd ACK - client flips mp_capable flag 'H' in the 3rd ACK related to: issue #3 Signed-off-by: Davide Caratti <[email protected]>
- Loading branch information
Showing
6 changed files
with
135 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,22 @@ | ||
// test the mp_capable 'B' flag according to RFC8684 § 3.1 | ||
`../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 1460,sackOK,nop,nop,nop,wscale 8,mpcapable v1 flags 0x41 nokey> | ||
+0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8> | ||
+0.01 < . 1:1(0) ack 1 win 257 | ||
+0 accept(3, ..., ...) = 4 | ||
|
||
// ensure that traffic plane is functional and does not use DSS | ||
|
||
+0 write(4, ..., 1000) = 1000 | ||
+0 > P. 1:1001(1000) ack 1 | ||
+0 < P. 1:501(500) ack 1001 win 257 | ||
+0 > . 1001:1001(0) ack 501 | ||
+0 read(4, ..., 1000) = 500 | ||
|
||
|
23 changes: 23 additions & 0 deletions
23
gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagB_3rd_ack.pkt
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,23 @@ | ||
// Test mp_capable mptcp option, first syn sent by packetdrill | ||
`../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 < . 1:1(0) ack 1 win 257 <mpcapable v1 flags [flag_b,flag_h] key[ckey=2,skey] > | ||
+0 accept(3, ..., ...) = 4 | ||
|
||
// ensure that traffic plane is functional and does not use DSS | ||
|
||
+0 write(4, ..., 1000) = 1000 | ||
+0 > P. 1:1001(1000) ack 1 | ||
+0 < P. 1:501(500) ack 1001 win 257 | ||
+0 > . 1001:1001(0) ack 501 | ||
+0 read(4, ..., 1000) = 500 | ||
|
||
|
||
|
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,22 @@ | ||
// test fallback to TCP of the mp_capable 'H' flag according to RFC8684 § 3.1 | ||
`../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 1460,sackOK,nop,nop,nop,wscale 8,mpcapable v1 flags 0x0 nokey> | ||
+0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8> | ||
+0.01 < . 1:1(0) ack 1 win 257 | ||
+0 accept(3, ..., ...) = 4 | ||
|
||
// ensure that traffic plane is functional and does not use DSS | ||
|
||
+0 write(4, ..., 1000) = 1000 | ||
+0 > P. 1:1001(1000) ack 1 | ||
+0 < P. 1:501(500) ack 1001 win 257 | ||
+0 > . 1001:1001(0) ack 501 | ||
+0 read(4, ..., 1000) = 500 | ||
|
||
|
23 changes: 23 additions & 0 deletions
23
gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagH_3rd_ack.pkt
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,23 @@ | ||
// Test mp_capable mptcp option, first syn sent by packetdrill | ||
`../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 < . 1:1(0) ack 1 win 257 <mpcapable v1 flags 0x0 key[ckey=2,skey] > | ||
+0 accept(3, ..., ...) = 4 | ||
|
||
// ensure that traffic plane is functional and does not use DSS | ||
|
||
+0 write(4, ..., 1000) = 1000 | ||
+0 > P. 1:1001(1000) ack 1 | ||
+0 < P. 1:501(500) ack 1001 win 257 | ||
+0 > . 1001:1001(0) ack 501 | ||
+0 read(4, ..., 1000) = 500 | ||
|
||
|
||
|
22 changes: 22 additions & 0 deletions
22
gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_wrongver.pkt
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,22 @@ | ||
// test TCP fallback in case of wrong 'version' according to RFC8684 § 3.1 | ||
`../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 1460,sackOK,nop,nop,nop,wscale 8,mpcapable v1 flags 0x41 nokey> | ||
+0 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 8> | ||
+0.01 < . 1:1(0) ack 1 win 257 | ||
+0 accept(3, ..., ...) = 4 | ||
|
||
// ensure that traffic plane is functional and does not use DSS | ||
|
||
+0 write(4, ..., 1000) = 1000 | ||
+0 > P. 1:1001(1000) ack 1 | ||
+0 < P. 1:501(500) ack 1001 win 257 | ||
+0 > . 1001:1001(0) ack 501 | ||
+0 read(4, ..., 1000) = 500 | ||
|
||
|
23 changes: 23 additions & 0 deletions
23
gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_wrongver_3rd_ack.pkt
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,23 @@ | ||
// Test mp_capable mptcp option, first syn sent by packetdrill | ||
`../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 < . 1:1(0) ack 1 win 257 <mpcapable v0 flags[flag_h] key[ckey=2,skey] > | ||
+0 accept(3, ..., ...) = 4 | ||
|
||
// ensure that traffic plane is functional and does not use DSS | ||
|
||
+0 write(4, ..., 1000) = 1000 | ||
+0 > P. 1:1001(1000) ack 1 | ||
+0 < P. 1:501(500) ack 1001 win 257 | ||
+0 > . 1001:1001(0) ack 501 | ||
+0 read(4, ..., 1000) = 500 | ||
|
||
|
||
|