From da6e5fcaf8c889a62255cf8f3824627159f740a3 Mon Sep 17 00:00:00 2001 From: Davide Caratti Date: Mon, 17 Aug 2020 16:13:38 +0200 Subject: [PATCH] fix data-fin in 'dss' and 'add_addr' tests on recent kernels (5.9-rc1+), a call to close() causes the transmission of a regular TCP ACK having the DATA FIN bit set. Then, the kernel under test immediately sends a TCP FIN with DACK and DATA FIN: adjust tests in the 'dss' and 'add_addr' folders accordingly. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/69 Signed-off-by: Davide Caratti --- gtests/net/mptcp/add_addr/add_addr_client.pkt | 2 +- gtests/net/mptcp/add_addr/add_addr_server.pkt | 2 +- gtests/net/mptcp/dss/dss_ssn_specified_client.pkt | 5 +++-- gtests/net/mptcp/dss/dss_ssn_specified_server.pkt | 3 ++- gtests/net/mptcp/dss/mpc_with_data_server.pkt | 1 + 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gtests/net/mptcp/add_addr/add_addr_client.pkt b/gtests/net/mptcp/add_addr/add_addr_client.pkt index bdcb889d..d560a1b1 100644 --- a/gtests/net/mptcp/add_addr/add_addr_client.pkt +++ b/gtests/net/mptcp/add_addr/add_addr_client.pkt @@ -21,4 +21,4 @@ +0.0 < . 1:1(0) ack 101 win 256 +0.4 close(3) = 0 -+0.0 > F. 101:101(0) ack 1 ++0.0 > . 101:101(0) ack 1 diff --git a/gtests/net/mptcp/add_addr/add_addr_server.pkt b/gtests/net/mptcp/add_addr/add_addr_server.pkt index 2ed0d8a5..b903eb38 100644 --- a/gtests/net/mptcp/add_addr/add_addr_server.pkt +++ b/gtests/net/mptcp/add_addr/add_addr_server.pkt @@ -22,4 +22,4 @@ +0.3 read(4, ..., 1000) = 1000 +0 close(4) = 0 -+0 > F. 1:1(0) ack 1001 ++0 > . 1:1(0) ack 1001 diff --git a/gtests/net/mptcp/dss/dss_ssn_specified_client.pkt b/gtests/net/mptcp/dss/dss_ssn_specified_client.pkt index 55b52a07..4861ec01 100644 --- a/gtests/net/mptcp/dss/dss_ssn_specified_client.pkt +++ b/gtests/net/mptcp/dss/dss_ssn_specified_client.pkt @@ -21,6 +21,7 @@ +0.3 read(3, ..., 1000) = 1000 +0.0 write(3,..., 100) = 100 +0.0 > P. 1:101(100) ack 1001 ++0.0 < . 1001:1001(0) ack 101 win 450 +0.4 close(3) = 0 -// SSN should be 0 for DATA-FIN packets carrying no data at all -+0.0 > F. 101:101(0) ack 1001 ++0.0 > . 101:101(0) ack 1001 ++0.0 > F. 101:101(0) ack 1001 diff --git a/gtests/net/mptcp/dss/dss_ssn_specified_server.pkt b/gtests/net/mptcp/dss/dss_ssn_specified_server.pkt index 212e1330..d67ccbb5 100644 --- a/gtests/net/mptcp/dss/dss_ssn_specified_server.pkt +++ b/gtests/net/mptcp/dss/dss_ssn_specified_server.pkt @@ -30,7 +30,8 @@ // send 1 more data segment, this time dack8 will have to be used: server sent dsn8 +0 write(4, ..., 1000) = 1000 +0 > P. 2001:3001(1000) ack 11 -+0.1 < . 11:11(0) ack 3001 win 225 ++0 < . 11:11(0) ack 3001 win 225 +0 close(4) = 0 ++0 > . 3001:3001(0) ack 11 +0 > F. 3001:3001(0) ack 11 diff --git a/gtests/net/mptcp/dss/mpc_with_data_server.pkt b/gtests/net/mptcp/dss/mpc_with_data_server.pkt index e292a2b3..8350195a 100644 --- a/gtests/net/mptcp/dss/mpc_with_data_server.pkt +++ b/gtests/net/mptcp/dss/mpc_with_data_server.pkt @@ -24,4 +24,5 @@ // read 100 bytes from the MPC+data +0.01 read(4, ..., 100) = 100 +0 close(4) = 0 ++0 > . 1001:1001(0) ack 101 +0 > F. 1001:1001(0) ack 101