Skip to content

Commit

Permalink
fix data-fin in 'dss' tests
Browse files Browse the repository at this point in the history
on recent kernels (5.9-rc1+), a call to close() causes the transmission of a
regular ack having the DATA FIN bit set. This bit is acknowledged by the
peer and then subflows are closed with TCP FIN: adjust tests in the
'dss' and 'add_addr' folders accordingly.

Closes: multipath-tcp/mptcp_net-next#69
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
  • Loading branch information
dcaratti committed Aug 17, 2020
1 parent 2399cd3 commit 26c53a9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gtests/net/mptcp/add_addr/add_addr_client.pkt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
+0.0 < . 1:1(0) ack 101 win 256 <nop,nop,TS val 705 ecr 305,add_address addr[saddr] hmac=auto,dss dack8=101 dll=0 nocs>

+0.4 close(3) = 0
+0.0 > F. 101:101(0) ack 1 <nop, nop,TS val 494 ecr 700,dss dack4=1 dsn8=101 ssn=0 dll=1 nocs fin, nop, nop>
+0.0 > . 101:101(0) ack 1 <nop, nop,TS val 494 ecr 700,dss dack4=1 dsn8=101 ssn=0 dll=1 nocs fin, nop, nop>
2 changes: 1 addition & 1 deletion gtests/net/mptcp/add_addr/add_addr_server.pkt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
+0.3 read(4, ..., 1000) = 1000

+0 close(4) = 0
+0 > F. 1:1(0) ack 1001 <dss dack8=1001 dsn8=1 ssn=0 dll=1 nocs fin, nop, nop>
+0 > . 1:1(0) ack 1001 <dss dack8=1001 dsn8=1 ssn=0 dll=1 nocs fin, nop, nop>
6 changes: 4 additions & 2 deletions gtests/net/mptcp/dss/dss_ssn_specified_client.pkt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
+0.3 read(3, ..., 1000) = 1000
+0.0 write(3,..., 100) = 100
+0.0 > P. 1:101(100) ack 1001 <nop, nop, TS val 100 ecr 700, dss dack8=1001 dsn8=1 ssn=1 dll=100 nocs, nop, nop>
+0.0 < . 1001:1001(0) ack 101 win 450 <dss dack8=101 nocs>
+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 <nop, nop,TS val 100 ecr 700,dss dack8=1001 dsn8=101 ssn=0 dll=1 nocs fin, nop, nop>
+0.0 > . 101:101(0) ack 1001 <nop, nop,TS val 100 ecr 700,dss dack8=1001 dsn8=101 ssn=0 dll=1 nocs fin, nop, nop>
+0.0 < . 1001:1001(0) ack 101 win 450 <dss dack8=101 nocs>
+0.0 > F. 101:101(0) ack 1001 <nop, nop,TS val 100 ecr 700,dss dack8=1001 dsn8=101 ssn=0 dll=1 nocs fin, nop, nop>
6 changes: 5 additions & 1 deletion gtests/net/mptcp/dss/dss_ssn_specified_server.pkt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
// 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 <dss dack8=11 dsn8=2001 ssn=2001 dll=1000 nocs, nop, nop>
+0.1 < . 11:11(0) ack 3001 win 225 <dss dack8=3001 dsn8=10 ssn=1 dll=0 nocs, nop, nop>
+0 < . 11:11(0) ack 3001 win 225 <dss dack8=3001 dsn8=10 ssn=1 dll=0 nocs, nop, nop>

+0 close(4) = 0
+0 > . 3001:3001(0) ack 11 <dss dack8=11 dsn8=3001 ssn=0 dll=1 nocs fin, nop, nop>
// rcv DATA_ACK[DFIN]
+0 < . 11:11(0) ack 3001 win 225 <dss dack8=3001 nocs>
// close all subflows
+0 > F. 3001:3001(0) ack 11 <dss dack8=11 dsn8=3001 ssn=0 dll=1 nocs fin, nop, nop>
2 changes: 2 additions & 0 deletions gtests/net/mptcp/dss/mpc_with_data_server.pkt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@
// read 100 bytes from the MPC+data
+0.01 read(4, ..., 100) = 100
+0 close(4) = 0
+0 > . 1001:1001(0) ack 101 <dss dack8=101 dsn8=1001 ssn=0 dll=1 nocs fin, nop, nop>
+0 < F. 101:101(0) ack 1001 win 225 <dss dack8=1001 nocs>
+0 > F. 1001:1001(0) ack 101 <dss dack8=101 dsn8=1001 ssn=0 dll=1 nocs fin, nop, nop>

0 comments on commit 26c53a9

Please sign in to comment.