diff --git a/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagB.pkt b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagB.pkt new file mode 100644 index 00000000..0a5b91f3 --- /dev/null +++ b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagB.pkt @@ -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 ++0 > S. 0:0(0) ack 1 ++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 + + diff --git a/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagB_3rd_ack.pkt b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagB_3rd_ack.pkt new file mode 100644 index 00000000..a1551269 --- /dev/null +++ b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagB_3rd_ack.pkt @@ -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 ++0 > S. 0:0(0) ack 1 ++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 + + + diff --git a/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagH.pkt b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagH.pkt new file mode 100644 index 00000000..f20fdcac --- /dev/null +++ b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagH.pkt @@ -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 ++0 > S. 0:0(0) ack 1 ++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 + + diff --git a/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagH_3rd_ack.pkt b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagH_3rd_ack.pkt new file mode 100644 index 00000000..a81ec55f --- /dev/null +++ b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_flagH_3rd_ack.pkt @@ -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 ++0 > S. 0:0(0) ack 1 ++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 + + + diff --git a/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_wrongver.pkt b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_wrongver.pkt new file mode 100644 index 00000000..0d2577fe --- /dev/null +++ b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_wrongver.pkt @@ -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 ++0 > S. 0:0(0) ack 1 ++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 + + diff --git a/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_wrongver_3rd_ack.pkt b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_wrongver_3rd_ack.pkt new file mode 100644 index 00000000..08fa6347 --- /dev/null +++ b/gtests/net/mptcp/mp_capable/v1_bind_tcpfallback_wrongver_3rd_ack.pkt @@ -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 ++0 > S. 0:0(0) ack 1 ++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 + + +