diff --git a/gtests/net/mptcp/mp_capable/v1_mp_capable_connect_drop_fallback.pkt b/gtests/net/mptcp/mp_capable/v1_mp_capable_connect_drop_fallback.pkt new file mode 100644 index 00000000..a72ebe6b --- /dev/null +++ b/gtests/net/mptcp/mp_capable/v1_mp_capable_connect_drop_fallback.pkt @@ -0,0 +1,27 @@ +--tolerance_usecs=100000 +`../common/defaults.sh` + +0.0 socket(..., SOCK_STREAM, IPPROTO_MPTCP) = 3 ++0.0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 ++0.0 getsockopt(3, SOL_TCP, TCP_IS_MPTCP, [1], [4]) = 0 ++0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) ++0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 + +// Establish connection and verify that there is a fallback to TCP. + ++0 `nstat -n` ++0.0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress) ++0.0 > S 0:0(0) ++1.0 > S 0:0(0) ++1.0 > S 0:0(0) + ++1.0 > S 0:0(0) ++0.01 < S. 0:0(0) ack 1 win 65535 ++0.0 > . 1:1(0) ack 1 + ++0.200 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 + +// Check for fallback ++0.0 getsockopt(3, SOL_TCP, TCP_IS_MPTCP, [0], [4]) = 0 ++0.01 `test $(nstat -zjs | jq '.kernel.MPTcpExtMPCapableSYNTXDrop') -eq 1` ++0.01 `test $(nstat -zjs | jq '.kernel.MPTcpExtBlackhole') -eq 1`