Skip to content

Commit a00d9f1

Browse files
authored
Merge pull request google#42 from pabeni/mptcp_mptcp-net-next
mptcp: new syscall test for full DATA_FIN handshake after close
2 parents b6d7619 + 122e1b9 commit a00d9f1

File tree

6 files changed

+33
-7
lines changed

6 files changed

+33
-7
lines changed

gtests/net/mptcp/dss/dss_ssn_specified_client.pkt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@
2828
+0.4 close(3) = 0
2929
+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>
3030
+0.0 < . 1001:1001(0) ack 101 win 450 <dss dack8=102 nocs>
31-
+0.0 > F. 101:101(0) ack 1001 <nop, nop, TS val 100 ecr 700, dss dack8=1001 nocs>

gtests/net/mptcp/dss/dss_ssn_specified_server.pkt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,3 @@
3434
+0 close(4) = 0
3535
+0 > . 3001:3001(0) ack 11 <dss dack8=11 dsn8=3001 ssn=0 dll=1 nocs fin, nop, nop>
3636
+0 < . 11:11(0) ack 3001 win 225 <dss dack8=3002 nocs>
37-
+0 > F. 3001:3001(0) ack 11 <dss dack8=11 nocs>

gtests/net/mptcp/dss/mpc_with_data_server.pkt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@
2525
+0 close(4) = 0
2626
+0 > . 1001:1001(0) ack 101 <dss dack8=101 dsn8=1001 ssn=0 dll=1 nocs fin, nop, nop>
2727
+0 < . 101:101(0) ack 1001 win 225 <dss dack8=1002 nocs>
28-
+0 > F. 1001:1001(0) ack 101 <dss dack8=101 nocs>

gtests/net/mptcp/syscalls/connect_close.pkt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,4 @@
1818
+0.0 close(3) = 0
1919
+0.0 > . 1:1(0) ack 1 <nop, nop, TS val 101 ecr 700, dss dack4=1 dsn8=1 ssn=0 dll=1 nocs fin, nop, nop>
2020
+0.0 < . 1:1(0) ack 1 win 450 <nop, nop, TS val 700 ecr 100, dss dack4=2 nocs>
21-
+0.0 > F. 1:1(0) ack 1 <nop, nop, TS val 101 ecr 700, dss dack4=1 nocs>
22-
+0.0 < . 2:2(0) ack 2 win 450 <nop, nop, TS val 700 ecr 100, dss dack4=2 nocs>
2321

gtests/net/mptcp/syscalls/connect_close_ack_ooo.pkt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,4 @@
1818
+0.0 close(3) = 0
1919
+0.0 > . 1:1(0) ack 1 <nop, nop, TS val 101 ecr 700, dss dack4=1 dsn8=1 ssn=0 dll=1 nocs fin, nop, nop>
2020
+0.0 < . 2:2(0) ack 1 win 450 <nop, nop, TS val 700 ecr 100, dss dack4=2 nocs>
21-
+0.0 > F. 1:1(0) ack 1 <nop, nop, TS val 101 ecr 700, dss dack4=1 nocs>
22-
+0.0 < . 2:2(0) ack 2 win 450 <nop, nop, TS val 700 ecr 100, dss dack4=2 nocs>
2321

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// connect() function, connection initiated by the kernel
2+
--tolerance_usecs=100000
3+
`../common/defaults.sh`
4+
5+
0.0 socket(..., SOCK_STREAM, IPPROTO_MPTCP) = 3
6+
+0.0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
7+
+0.0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
8+
+0.0 fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
9+
10+
// Establish connection and verify that there was no error.
11+
12+
+0.0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
13+
+0.0 > S 0:0(0) <mss 1460, sackOK, TS val 100 ecr 0, nop, wscale 8, mpcapable v1 flags[flag_h] nokey>
14+
+0.0 < S. 0:0(0) ack 1 win 65535 <mss 1460, sackOK, TS val 700 ecr 100, nop, wscale 8, mpcapable v1 flags[flag_h] key[skey=2]>
15+
+0.0 > . 1:1(0) ack 1 <nop, nop, TS val 100 ecr 700, mpcapable v1 flags[flag_h] key[ckey, skey]>
16+
17+
// client shutdown before any incoming DSS
18+
+0.0 close(3) = 0
19+
+0.0 > . 1:1(0) ack 1 <nop, nop, TS val 101 ecr 700, dss dack4=1 dsn8=1 ssn=0 dll=1 nocs fin, nop, nop>
20+
+0.0 < . 1:1(0) ack 1 win 450 <nop, nop, TS val 700 ecr 100, dss dack4=2 nocs>
21+
22+
// incoming DATA_FIN should be acked, using 4 bytes dsn, just for more noise
23+
24+
+0.0 < . 1:1(0) ack 1 win 450 <nop, nop, TS val 700 ecr 100, dss dack4=2 dsn4=1 ssn=0 dll=1 nocs fin, nop, nop>
25+
+0.0 > . 1:1(0) ack 1 <nop, nop, TS val 101 ecr 700, dss dack4=2 nocs>
26+
+0.0 > F. 1:1(0) ack 1 <nop, nop, TS val 101 ecr 700, dss dack4=2 nocs>
27+
+0.0 < . 1:1(0) ack 2 win 450 <nop, nop, TS val 700 ecr 100, dss dack4=2 nocs>
28+
+0.0 < F. 1:1(0) ack 2 win 450 <nop, nop, TS val 700 ecr 100, dss dack4=2 nocs>
29+
30+
// the final ack will be emitted by a time-wait socket, no dack/mptcp options
31+
32+
+0.0 > . 2:2(0) ack 2 <nop, nop, TS val 101 ecr 700>
33+

0 commit comments

Comments
 (0)