xref: /openbmc/linux/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh (revision 816ffd28002651a469e86d1118a225862e392ecd)
1dc65fe82SFlorian Westphal#!/bin/bash
2dc65fe82SFlorian Westphal# SPDX-License-Identifier: GPL-2.0
3dc65fe82SFlorian Westphal
4cf6f0fdaSMatthieu Baerts. "$(dirname "${0}")/mptcp_lib.sh"
5cf6f0fdaSMatthieu Baerts
6dc65fe82SFlorian Westphalret=0
7dc65fe82SFlorian Westphalsin=""
8dc65fe82SFlorian Westphalsout=""
9dc65fe82SFlorian Westphalcin=""
10dc65fe82SFlorian Westphalcout=""
11dc65fe82SFlorian Westphalksft_skip=4
12dc65fe82SFlorian Westphaltimeout_poll=30
13dc65fe82SFlorian Westphaltimeout_test=$((timeout_poll * 2 + 1))
14dc65fe82SFlorian Westphalmptcp_connect=""
15a5a5990cSMatthieu Baertsiptables="iptables"
16a5a5990cSMatthieu Baertsip6tables="ip6tables"
17dc65fe82SFlorian Westphal
18de239202SMatthieu Baertssec=$(date +%s)
19de239202SMatthieu Baertsrndh=$(printf %x $sec)-$(mktemp -u XXXXXX)
20de239202SMatthieu Baertsns1="ns1-$rndh"
21de239202SMatthieu Baertsns2="ns2-$rndh"
22de239202SMatthieu Baertsns_sbox="ns_sbox-$rndh"
23de239202SMatthieu Baerts
24dc65fe82SFlorian Westphaladd_mark_rules()
25dc65fe82SFlorian Westphal{
26dc65fe82SFlorian Westphal	local ns=$1
27dc65fe82SFlorian Westphal	local m=$2
28dc65fe82SFlorian Westphal
295f17f8e3SMatthieu Baerts	local t
30a5a5990cSMatthieu Baerts	for t in ${iptables} ${ip6tables}; do
31dc65fe82SFlorian Westphal		# just to debug: check we have multiple subflows connection requests
32dc65fe82SFlorian Westphal		ip netns exec $ns $t -A OUTPUT -p tcp --syn -m mark --mark $m -j ACCEPT
33dc65fe82SFlorian Westphal
34dc65fe82SFlorian Westphal		# RST packets might be handled by a internal dummy socket
35dc65fe82SFlorian Westphal		ip netns exec $ns $t -A OUTPUT -p tcp --tcp-flags RST RST -m mark --mark 0 -j ACCEPT
36dc65fe82SFlorian Westphal
37dc65fe82SFlorian Westphal		ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark $m -j ACCEPT
38dc65fe82SFlorian Westphal		ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark 0 -j DROP
39dc65fe82SFlorian Westphal	done
40dc65fe82SFlorian Westphal}
41dc65fe82SFlorian Westphal
42dc65fe82SFlorian Westphalinit()
43dc65fe82SFlorian Westphal{
445f17f8e3SMatthieu Baerts	local netns
457e68d310SMatthieu Baerts	for netns in "$ns1" "$ns2" "$ns_sbox";do
46dc65fe82SFlorian Westphal		ip netns add $netns || exit $ksft_skip
47dc65fe82SFlorian Westphal		ip -net $netns link set lo up
48dc65fe82SFlorian Westphal		ip netns exec $netns sysctl -q net.mptcp.enabled=1
49dc65fe82SFlorian Westphal		ip netns exec $netns sysctl -q net.ipv4.conf.all.rp_filter=0
50dc65fe82SFlorian Westphal		ip netns exec $netns sysctl -q net.ipv4.conf.default.rp_filter=0
51dc65fe82SFlorian Westphal	done
52dc65fe82SFlorian Westphal
535f17f8e3SMatthieu Baerts	local i
54dc65fe82SFlorian Westphal	for i in `seq 1 4`; do
55dc65fe82SFlorian Westphal		ip link add ns1eth$i netns "$ns1" type veth peer name ns2eth$i netns "$ns2"
56dc65fe82SFlorian Westphal		ip -net "$ns1" addr add 10.0.$i.1/24 dev ns1eth$i
57dc65fe82SFlorian Westphal		ip -net "$ns1" addr add dead:beef:$i::1/64 dev ns1eth$i nodad
58dc65fe82SFlorian Westphal		ip -net "$ns1" link set ns1eth$i up
59dc65fe82SFlorian Westphal
60dc65fe82SFlorian Westphal		ip -net "$ns2" addr add 10.0.$i.2/24 dev ns2eth$i
61dc65fe82SFlorian Westphal		ip -net "$ns2" addr add dead:beef:$i::2/64 dev ns2eth$i nodad
62dc65fe82SFlorian Westphal		ip -net "$ns2" link set ns2eth$i up
63dc65fe82SFlorian Westphal
64dc65fe82SFlorian Westphal		# let $ns2 reach any $ns1 address from any interface
65dc65fe82SFlorian Westphal		ip -net "$ns2" route add default via 10.0.$i.1 dev ns2eth$i metric 10$i
66dc65fe82SFlorian Westphal
67dc65fe82SFlorian Westphal		ip netns exec $ns1 ./pm_nl_ctl add 10.0.$i.1 flags signal
68dc65fe82SFlorian Westphal		ip netns exec $ns1 ./pm_nl_ctl add dead:beef:$i::1 flags signal
69dc65fe82SFlorian Westphal
70dc65fe82SFlorian Westphal		ip netns exec $ns2 ./pm_nl_ctl add 10.0.$i.2 flags signal
71dc65fe82SFlorian Westphal		ip netns exec $ns2 ./pm_nl_ctl add dead:beef:$i::2 flags signal
72dc65fe82SFlorian Westphal	done
73dc65fe82SFlorian Westphal
74dc65fe82SFlorian Westphal	ip netns exec $ns1 ./pm_nl_ctl limits 8 8
75dc65fe82SFlorian Westphal	ip netns exec $ns2 ./pm_nl_ctl limits 8 8
76dc65fe82SFlorian Westphal
77dc65fe82SFlorian Westphal	add_mark_rules $ns1 1
78dc65fe82SFlorian Westphal	add_mark_rules $ns2 2
79dc65fe82SFlorian Westphal}
80dc65fe82SFlorian Westphal
81dc65fe82SFlorian Westphalcleanup()
82dc65fe82SFlorian Westphal{
835f17f8e3SMatthieu Baerts	local netns
847e68d310SMatthieu Baerts	for netns in "$ns1" "$ns2" "$ns_sbox"; do
85dc65fe82SFlorian Westphal		ip netns del $netns
86dc65fe82SFlorian Westphal	done
87dc65fe82SFlorian Westphal	rm -f "$cin" "$cout"
88dc65fe82SFlorian Westphal	rm -f "$sin" "$sout"
89dc65fe82SFlorian Westphal}
90dc65fe82SFlorian Westphal
91cf6f0fdaSMatthieu Baertsmptcp_lib_check_mptcp
92c6f7ecccSMatthieu Baertsmptcp_lib_check_kallsyms
93cf6f0fdaSMatthieu Baerts
94dc65fe82SFlorian Westphalip -Version > /dev/null 2>&1
95dc65fe82SFlorian Westphalif [ $? -ne 0 ];then
96dc65fe82SFlorian Westphal	echo "SKIP: Could not run test without ip tool"
97dc65fe82SFlorian Westphal	exit $ksft_skip
98dc65fe82SFlorian Westphalfi
99dc65fe82SFlorian Westphal
100a5a5990cSMatthieu Baerts# Use the legacy version if available to support old kernel versions
101a5a5990cSMatthieu Baertsif iptables-legacy -V &> /dev/null; then
102a5a5990cSMatthieu Baerts	iptables="iptables-legacy"
103a5a5990cSMatthieu Baerts	ip6tables="ip6tables-legacy"
104a5a5990cSMatthieu Baertselif ! iptables -V &> /dev/null; then
105dc65fe82SFlorian Westphal	echo "SKIP: Could not run all tests without iptables tool"
106dc65fe82SFlorian Westphal	exit $ksft_skip
107a5a5990cSMatthieu Baertselif ! ip6tables -V &> /dev/null; then
108dc65fe82SFlorian Westphal	echo "SKIP: Could not run all tests without ip6tables tool"
109dc65fe82SFlorian Westphal	exit $ksft_skip
110dc65fe82SFlorian Westphalfi
111dc65fe82SFlorian Westphal
112dc65fe82SFlorian Westphalcheck_mark()
113dc65fe82SFlorian Westphal{
114dc65fe82SFlorian Westphal	local ns=$1
115dc65fe82SFlorian Westphal	local af=$2
116dc65fe82SFlorian Westphal
117a5a5990cSMatthieu Baerts	local tables=${iptables}
118dc65fe82SFlorian Westphal
119dc65fe82SFlorian Westphal	if [ $af -eq 6 ];then
120a5a5990cSMatthieu Baerts		tables=${ip6tables}
121dc65fe82SFlorian Westphal	fi
122dc65fe82SFlorian Westphal
1235f17f8e3SMatthieu Baerts	local counters values
124dc65fe82SFlorian Westphal	counters=$(ip netns exec $ns $tables -v -L OUTPUT | grep DROP)
125dc65fe82SFlorian Westphal	values=${counters%DROP*}
126dc65fe82SFlorian Westphal
1275f17f8e3SMatthieu Baerts	local v
128dc65fe82SFlorian Westphal	for v in $values; do
129dc65fe82SFlorian Westphal		if [ $v -ne 0 ]; then
130dc65fe82SFlorian Westphal			echo "FAIL: got $tables $values in ns $ns , not 0 - not all expected packets marked" 1>&2
1319ac4c28eSMatthieu Baerts			ret=1
132dc65fe82SFlorian Westphal			return 1
133dc65fe82SFlorian Westphal		fi
134dc65fe82SFlorian Westphal	done
135dc65fe82SFlorian Westphal
136dc65fe82SFlorian Westphal	return 0
137dc65fe82SFlorian Westphal}
138dc65fe82SFlorian Westphal
139dc65fe82SFlorian Westphalprint_file_err()
140dc65fe82SFlorian Westphal{
141dc65fe82SFlorian Westphal	ls -l "$1" 1>&2
142dc65fe82SFlorian Westphal	echo "Trailing bytes are: "
143dc65fe82SFlorian Westphal	tail -c 27 "$1"
144dc65fe82SFlorian Westphal}
145dc65fe82SFlorian Westphal
146dc65fe82SFlorian Westphalcheck_transfer()
147dc65fe82SFlorian Westphal{
1485f17f8e3SMatthieu Baerts	local in=$1
1495f17f8e3SMatthieu Baerts	local out=$2
1505f17f8e3SMatthieu Baerts	local what=$3
151dc65fe82SFlorian Westphal
152dc65fe82SFlorian Westphal	cmp "$in" "$out" > /dev/null 2>&1
153dc65fe82SFlorian Westphal	if [ $? -ne 0 ] ;then
154dc65fe82SFlorian Westphal		echo "[ FAIL ] $what does not match (in, out):"
155dc65fe82SFlorian Westphal		print_file_err "$in"
156dc65fe82SFlorian Westphal		print_file_err "$out"
157dc65fe82SFlorian Westphal		ret=1
158dc65fe82SFlorian Westphal
159dc65fe82SFlorian Westphal		return 1
160dc65fe82SFlorian Westphal	fi
161dc65fe82SFlorian Westphal
162dc65fe82SFlorian Westphal	return 0
163dc65fe82SFlorian Westphal}
164dc65fe82SFlorian Westphal
165dc65fe82SFlorian Westphaldo_transfer()
166dc65fe82SFlorian Westphal{
1675f17f8e3SMatthieu Baerts	local listener_ns="$1"
1685f17f8e3SMatthieu Baerts	local connector_ns="$2"
1695f17f8e3SMatthieu Baerts	local cl_proto="$3"
1705f17f8e3SMatthieu Baerts	local srv_proto="$4"
1715f17f8e3SMatthieu Baerts	local connect_addr="$5"
172dc65fe82SFlorian Westphal
1735f17f8e3SMatthieu Baerts	local port=12001
174dc65fe82SFlorian Westphal
175dc65fe82SFlorian Westphal	:> "$cout"
176dc65fe82SFlorian Westphal	:> "$sout"
177dc65fe82SFlorian Westphal
1785f17f8e3SMatthieu Baerts	local mptcp_connect="./mptcp_connect -r 20"
179dc65fe82SFlorian Westphal
1809e86a297SMatthieu Baerts	local local_addr ip
181*8e7f31bfSGeliang Tang	if mptcp_lib_is_v6 "${connect_addr}"; then
182dc65fe82SFlorian Westphal		local_addr="::"
1839e86a297SMatthieu Baerts		ip=ipv6
184dc65fe82SFlorian Westphal	else
185dc65fe82SFlorian Westphal		local_addr="0.0.0.0"
1869e86a297SMatthieu Baerts		ip=ipv4
187dc65fe82SFlorian Westphal	fi
188dc65fe82SFlorian Westphal
189b631e3a4SMatthieu Baerts	cmsg="TIMESTAMPNS"
190b631e3a4SMatthieu Baerts	if mptcp_lib_kallsyms_has "mptcp_ioctl$"; then
191b631e3a4SMatthieu Baerts		cmsg+=",TCPINQ"
192b631e3a4SMatthieu Baerts	fi
193b631e3a4SMatthieu Baerts
194dc65fe82SFlorian Westphal	timeout ${timeout_test} \
195dc65fe82SFlorian Westphal		ip netns exec ${listener_ns} \
196b631e3a4SMatthieu Baerts			$mptcp_connect -t ${timeout_poll} -l -M 1 -p $port -s ${srv_proto} -c "${cmsg}" \
197dc65fe82SFlorian Westphal				${local_addr} < "$sin" > "$sout" &
1985f17f8e3SMatthieu Baerts	local spid=$!
199dc65fe82SFlorian Westphal
200dc65fe82SFlorian Westphal	sleep 1
201dc65fe82SFlorian Westphal
202dc65fe82SFlorian Westphal	timeout ${timeout_test} \
203dc65fe82SFlorian Westphal		ip netns exec ${connector_ns} \
204b631e3a4SMatthieu Baerts			$mptcp_connect -t ${timeout_poll} -M 2 -p $port -s ${cl_proto} -c "${cmsg}" \
205dc65fe82SFlorian Westphal				$connect_addr < "$cin" > "$cout" &
206dc65fe82SFlorian Westphal
2075f17f8e3SMatthieu Baerts	local cpid=$!
208dc65fe82SFlorian Westphal
209dc65fe82SFlorian Westphal	wait $cpid
2105f17f8e3SMatthieu Baerts	local retc=$?
211dc65fe82SFlorian Westphal	wait $spid
2125f17f8e3SMatthieu Baerts	local rets=$?
213dc65fe82SFlorian Westphal
214dc65fe82SFlorian Westphal	if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then
215dc65fe82SFlorian Westphal		echo " client exit code $retc, server $rets" 1>&2
216dc65fe82SFlorian Westphal		echo -e "\nnetns ${listener_ns} socket stat for ${port}:" 1>&2
217dc65fe82SFlorian Westphal		ip netns exec ${listener_ns} ss -Menita 1>&2 -o "sport = :$port"
218dc65fe82SFlorian Westphal
219dc65fe82SFlorian Westphal		echo -e "\nnetns ${connector_ns} socket stat for ${port}:" 1>&2
220dc65fe82SFlorian Westphal		ip netns exec ${connector_ns} ss -Menita 1>&2 -o "dport = :$port"
221dc65fe82SFlorian Westphal
2229e86a297SMatthieu Baerts		mptcp_lib_result_fail "transfer ${ip}"
2239e86a297SMatthieu Baerts
224dc65fe82SFlorian Westphal		ret=1
225dc65fe82SFlorian Westphal		return 1
226dc65fe82SFlorian Westphal	fi
227dc65fe82SFlorian Westphal
228dc65fe82SFlorian Westphal	if [ $local_addr = "::" ];then
2299ac4c28eSMatthieu Baerts		check_mark $listener_ns 6 || retc=1
2309ac4c28eSMatthieu Baerts		check_mark $connector_ns 6 || retc=1
231dc65fe82SFlorian Westphal	else
2329ac4c28eSMatthieu Baerts		check_mark $listener_ns 4 || retc=1
2339ac4c28eSMatthieu Baerts		check_mark $connector_ns 4 || retc=1
234dc65fe82SFlorian Westphal	fi
235dc65fe82SFlorian Westphal
236dc65fe82SFlorian Westphal	check_transfer $cin $sout "file received by server"
237dc65fe82SFlorian Westphal	rets=$?
238dc65fe82SFlorian Westphal
2399e86a297SMatthieu Baerts	mptcp_lib_result_code "${retc}" "mark ${ip}"
2409e86a297SMatthieu Baerts	mptcp_lib_result_code "${rets}" "transfer ${ip}"
2419e86a297SMatthieu Baerts
242dc65fe82SFlorian Westphal	if [ $retc -eq 0 ] && [ $rets -eq 0 ];then
243dc65fe82SFlorian Westphal		return 0
244dc65fe82SFlorian Westphal	fi
245dc65fe82SFlorian Westphal
246dc65fe82SFlorian Westphal	return 1
247dc65fe82SFlorian Westphal}
248dc65fe82SFlorian Westphal
249dc65fe82SFlorian Westphalmake_file()
250dc65fe82SFlorian Westphal{
2515f17f8e3SMatthieu Baerts	local name=$1
2525f17f8e3SMatthieu Baerts	local who=$2
2535f17f8e3SMatthieu Baerts	local size=$3
254dc65fe82SFlorian Westphal
255dc65fe82SFlorian Westphal	dd if=/dev/urandom of="$name" bs=1024 count=$size 2> /dev/null
256dc65fe82SFlorian Westphal	echo -e "\nMPTCP_TEST_FILE_END_MARKER" >> "$name"
257dc65fe82SFlorian Westphal
258dc65fe82SFlorian Westphal	echo "Created $name (size $size KB) containing data sent by $who"
259dc65fe82SFlorian Westphal}
260dc65fe82SFlorian Westphal
261ce997912SFlorian Westphaldo_mptcp_sockopt_tests()
262ce997912SFlorian Westphal{
263ce997912SFlorian Westphal	local lret=0
264ce997912SFlorian Westphal
265c6f7ecccSMatthieu Baerts	if ! mptcp_lib_kallsyms_has "mptcp_diag_fill_info$"; then
266c6f7ecccSMatthieu Baerts		echo "INFO: MPTCP sockopt not supported: SKIP"
2679e86a297SMatthieu Baerts		mptcp_lib_result_skip "sockopt"
268c6f7ecccSMatthieu Baerts		return
269c6f7ecccSMatthieu Baerts	fi
270c6f7ecccSMatthieu Baerts
2717e68d310SMatthieu Baerts	ip netns exec "$ns_sbox" ./mptcp_sockopt
272ce997912SFlorian Westphal	lret=$?
273ce997912SFlorian Westphal
274ce997912SFlorian Westphal	if [ $lret -ne 0 ]; then
275ce997912SFlorian Westphal		echo "FAIL: SOL_MPTCP getsockopt" 1>&2
2769e86a297SMatthieu Baerts		mptcp_lib_result_fail "sockopt v4"
277ce997912SFlorian Westphal		ret=$lret
278ce997912SFlorian Westphal		return
279ce997912SFlorian Westphal	fi
2809e86a297SMatthieu Baerts	mptcp_lib_result_pass "sockopt v4"
281ce997912SFlorian Westphal
2827e68d310SMatthieu Baerts	ip netns exec "$ns_sbox" ./mptcp_sockopt -6
283ce997912SFlorian Westphal	lret=$?
284ce997912SFlorian Westphal
285ce997912SFlorian Westphal	if [ $lret -ne 0 ]; then
286ce997912SFlorian Westphal		echo "FAIL: SOL_MPTCP getsockopt (ipv6)" 1>&2
2879e86a297SMatthieu Baerts		mptcp_lib_result_fail "sockopt v6"
288ce997912SFlorian Westphal		ret=$lret
289ce997912SFlorian Westphal		return
290ce997912SFlorian Westphal	fi
2919e86a297SMatthieu Baerts	mptcp_lib_result_pass "sockopt v6"
292ce997912SFlorian Westphal}
293ce997912SFlorian Westphal
294dc65fe82SFlorian Westphalrun_tests()
295dc65fe82SFlorian Westphal{
2965f17f8e3SMatthieu Baerts	local listener_ns="$1"
2975f17f8e3SMatthieu Baerts	local connector_ns="$2"
2985f17f8e3SMatthieu Baerts	local connect_addr="$3"
299ce997912SFlorian Westphal	local lret=0
300dc65fe82SFlorian Westphal
301dc65fe82SFlorian Westphal	do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP ${connect_addr}
302dc65fe82SFlorian Westphal
303dc65fe82SFlorian Westphal	lret=$?
304dc65fe82SFlorian Westphal
305dc65fe82SFlorian Westphal	if [ $lret -ne 0 ]; then
306dc65fe82SFlorian Westphal		ret=$lret
307dc65fe82SFlorian Westphal		return
308dc65fe82SFlorian Westphal	fi
309dc65fe82SFlorian Westphal}
310dc65fe82SFlorian Westphal
311b5188056SFlorian Westphaldo_tcpinq_test()
312b5188056SFlorian Westphal{
313b4e0df4cSMatthieu Baerts	ip netns exec "$ns_sbox" ./mptcp_inq "$@"
3145f17f8e3SMatthieu Baerts	local lret=$?
315b5188056SFlorian Westphal	if [ $lret -ne 0 ];then
316b5188056SFlorian Westphal		ret=$lret
317b5188056SFlorian Westphal		echo "FAIL: mptcp_inq $@" 1>&2
3189e86a297SMatthieu Baerts		mptcp_lib_result_fail "TCP_INQ: $*"
319b5188056SFlorian Westphal		return $lret
320b5188056SFlorian Westphal	fi
321b5188056SFlorian Westphal
322b5188056SFlorian Westphal	echo "PASS: TCP_INQ cmsg/ioctl $@"
3239e86a297SMatthieu Baerts	mptcp_lib_result_pass "TCP_INQ: $*"
324b5188056SFlorian Westphal	return $lret
325b5188056SFlorian Westphal}
326b5188056SFlorian Westphal
327b5188056SFlorian Westphaldo_tcpinq_tests()
328b5188056SFlorian Westphal{
329b5188056SFlorian Westphal	local lret=0
330b5188056SFlorian Westphal
331b631e3a4SMatthieu Baerts	if ! mptcp_lib_kallsyms_has "mptcp_ioctl$"; then
332b631e3a4SMatthieu Baerts		echo "INFO: TCP_INQ not supported: SKIP"
3339e86a297SMatthieu Baerts		mptcp_lib_result_skip "TCP_INQ"
334b631e3a4SMatthieu Baerts		return
335b631e3a4SMatthieu Baerts	fi
336b631e3a4SMatthieu Baerts
3375f17f8e3SMatthieu Baerts	local args
338b5188056SFlorian Westphal	for args in "-t tcp" "-r tcp"; do
339b5188056SFlorian Westphal		do_tcpinq_test $args
340b5188056SFlorian Westphal		lret=$?
341b5188056SFlorian Westphal		if [ $lret -ne 0 ] ; then
342b5188056SFlorian Westphal			return $lret
343b5188056SFlorian Westphal		fi
344b5188056SFlorian Westphal		do_tcpinq_test -6 $args
345b5188056SFlorian Westphal		lret=$?
346b5188056SFlorian Westphal		if [ $lret -ne 0 ] ; then
347b5188056SFlorian Westphal			return $lret
348b5188056SFlorian Westphal		fi
349b5188056SFlorian Westphal	done
350b5188056SFlorian Westphal
351b5188056SFlorian Westphal	do_tcpinq_test -r tcp -t tcp
352b5188056SFlorian Westphal
353b5188056SFlorian Westphal	return $?
354b5188056SFlorian Westphal}
355b5188056SFlorian Westphal
356dc65fe82SFlorian Westphalsin=$(mktemp)
357dc65fe82SFlorian Westphalsout=$(mktemp)
358dc65fe82SFlorian Westphalcin=$(mktemp)
359dc65fe82SFlorian Westphalcout=$(mktemp)
360dc65fe82SFlorian Westphalinit
361dc65fe82SFlorian Westphalmake_file "$cin" "client" 1
362dc65fe82SFlorian Westphalmake_file "$sin" "server" 1
363dc65fe82SFlorian Westphaltrap cleanup EXIT
364dc65fe82SFlorian Westphal
365dc65fe82SFlorian Westphalrun_tests $ns1 $ns2 10.0.1.1
366dc65fe82SFlorian Westphalrun_tests $ns1 $ns2 dead:beef:1::1
367dc65fe82SFlorian Westphal
368dc65fe82SFlorian Westphalif [ $ret -eq 0 ];then
369dc65fe82SFlorian Westphal	echo "PASS: all packets had packet mark set"
370dc65fe82SFlorian Westphalfi
371dc65fe82SFlorian Westphal
372ce997912SFlorian Westphaldo_mptcp_sockopt_tests
373ce997912SFlorian Westphalif [ $ret -eq 0 ];then
374ce997912SFlorian Westphal	echo "PASS: SOL_MPTCP getsockopt has expected information"
375ce997912SFlorian Westphalfi
376ce997912SFlorian Westphal
377b5188056SFlorian Westphaldo_tcpinq_tests
3789e86a297SMatthieu Baerts
3799e86a297SMatthieu Baertsmptcp_lib_result_print_all_tap
380dc65fe82SFlorian Westphalexit $ret
381