From: Yongjian Wang Check that a passive connection starts at tcp_base_mss with net.ipv4.tcp_mtu_probing=2, as an active connection does. Signed-off-by: Yongjian Wang --- .../net/packetdrill/tcp_mtu_probing_passive.pkt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_passive.pkt b/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_passive.pkt new file mode 100644 index 000000000000..14bae144cce2 --- /dev/null +++ b/tools/testing/selftests/net/packetdrill/tcp_mtu_probing_passive.pkt @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0 +// Test that a passive connection starts at tcp_base_mss with tcp_mtu_probing=2, +// the same way as an active connection. + +`./defaults.sh +sysctl -q net.ipv4.tcp_mtu_probing=2 +sysctl -q net.ipv4.tcp_base_mss=1024 +sysctl -q net.ipv4.tcp_timestamps=0` + + 0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 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 65535 + +0 > S. 0:0(0) ack 1 + +.1 < . 1:1(0) ack 1 win 65535 + +0 accept(3, ..., ...) = 4 + +// The initial window is sent with tcp_base_mss, not the peer's MSS. + +0 write(4, ..., 10240) = 10240 + +0 > P. 1:2049(2048) ack 1 + +0 > P. 2049:4097(2048) ack 1 + +0 > P. 4097:6145(2048) ack 1 + +0 > P. 6145:8193(2048) ack 1 + +0 > P. 8193:10241(2048) ack 1 + +.1 < . 1:1(0) ack 10241 win 65535 -- Git-157)