Lines Matching +full:client +full:- +full:id

2 # SPDX-License-Identifier: GPL-2.0
58 MPTCP_LIB_TEST_FORMAT="%02u %-68s"
88 if [ ${#} -gt 0 ]
112 rm -rf $file $client_evts $server_evts
124 if [ -f /proc/sys/net/mptcp/path_manager ]; then
125 ip netns exec "$ns1" sysctl -q net.mptcp.path_manager=userspace
126 pm_type="$(ip netns exec "$ns1" sysctl -n net.mptcp.pm_type)"
133 ip netns exec "$ns1" sysctl -q net.mptcp.path_manager=error 2>/dev/null
134 pm_type="$(ip netns exec "$ns1" sysctl -n net.mptcp.pm_type)"
141 ip netns exec "$ns1" sysctl -q net.mptcp.pm_type=0
142 pm_name="$(ip netns exec "$ns1" sysctl -n net.mptcp.path_manager)"
144 test_fail "unexpected path-manager: ${pm_name}"
151 ip netns exec "$i" sysctl -q net.mptcp.pm_type=1
160 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2
161 ip -net "$ns1" addr add 10.0.2.1/24 dev ns1eth2
162 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 nodad
163 ip -net "$ns1" addr add dead:beef:2::1/64 dev ns1eth2 nodad
164 ip -net "$ns1" link set ns1eth2 up
166 ip -net "$ns2" addr add 10.0.1.2/24 dev ns2eth1
167 ip -net "$ns2" addr add 10.0.2.2/24 dev ns2eth1
168 ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 nodad
169 ip -net "$ns2" addr add dead:beef:2::2/64 dev ns2eth1 nodad
170 ip -net "$ns2" link set ns2eth1 up
176 # the MPTCP client and server
209 ./mptcp_connect -s MPTCP -w 300 -p $app_port -l $listen_addr > /dev/null 2>&1 &
213 # Run the client, transfer $file and stay connected to the server
216 ./mptcp_connect -s MPTCP -w 300 -m sendfile -p $app_port $connect_addr\
221 # Capture client/server attributes from MPTCP connection netlink events
240 print_title "Connection info: ${client_addr}:${client_port} -> ${connect_addr}:${app_port}"
242 …test_fail "Expected tokens (c:${client_token} - s:${server_token}) and server (c:${client_serversi…
289 local id
300 id=$(mptcp_lib_evts_get_info rem_id "$evt" $e_type)
302 check_expected "type" "token" "addr" "dport" "id"
313 local invalid_token=$(( client4_token - 1))
314 ip netns exec "$ns2" ./pm_nl_ctl ann 10.0.2.2 token $invalid_token id\
327 # ADD_ADDR from the client to server machine reusing the subflow port
330 ./pm_nl_ctl ann 10.0.2.2 token "$client4_token" id $client_addr_id dev\
332 print_test "ADD_ADDR id:client 10.0.2.2 (ns2) => ns1, reuse port"
337 # ADD_ADDR6 from the client to server machine reusing the subflow port
340 dead:beef:2::2 token "$client6_token" id $client_addr_id dev ns2eth1
341 print_test "ADD_ADDR6 id:client dead:beef:2::2 (ns2) => ns1, reuse port"
346 # ADD_ADDR from the client to server machine using a new port
349 ip netns exec "$ns2" ./pm_nl_ctl ann 10.0.2.2 token "$client4_token" id\
351 print_test "ADD_ADDR id:client+1 10.0.2.2 (ns2) => ns1, new port"
356 # Capture events on the network namespace running the client
359 # ADD_ADDR from the server to client machine reusing the subflow port
360 ip netns exec "$ns1" ./pm_nl_ctl ann 10.0.2.1 token "$server4_token" id\
362 print_test "ADD_ADDR id:server 10.0.2.1 (ns1) => ns2, reuse port"
367 # ADD_ADDR6 from the server to client machine reusing the subflow port
369 ip netns exec "$ns1" ./pm_nl_ctl ann dead:beef:2::1 token "$server6_token" id\
371 print_test "ADD_ADDR6 id:server dead:beef:2::1 (ns1) => ns2, reuse port"
376 # ADD_ADDR from the server to client machine using a new port
379 ip netns exec "$ns1" ./pm_nl_ctl ann 10.0.2.1 token "$server4_token" id\
381 print_test "ADD_ADDR id:server+1 10.0.2.1 (ns1) => ns2, new port"
395 local id
399 id=$(mptcp_lib_evts_get_info rem_id "$evt" $e_type)
401 check_expected "type" "token" "id"
412 local invalid_token=$(( client4_token - 1 ))
413 ip netns exec "$ns2" ./pm_nl_ctl rem token $invalid_token id\
415 print_test "RM_ADDR id:client ns2 => ns1, invalid token"
425 # RM_ADDR using an invalid addr id should result in no action
427 ip netns exec "$ns2" ./pm_nl_ctl rem token "$client4_token" id\
429 print_test "RM_ADDR id:client+1 ns2 => ns1, invalid id"
438 # RM_ADDR from the client to server machine
440 ip netns exec "$ns2" ./pm_nl_ctl rem token "$client4_token" id\
442 print_test "RM_ADDR id:client ns2 => ns1"
446 # RM_ADDR from the client to server machine
448 client_addr_id=$(( client_addr_id - 1 ))
449 ip netns exec "$ns2" ./pm_nl_ctl rem token "$client4_token" id\
451 print_test "RM_ADDR id:client-1 ns2 => ns1"
455 # RM_ADDR6 from the client to server machine
457 ip netns exec "$ns2" ./pm_nl_ctl rem token "$client6_token" id\
459 print_test "RM_ADDR6 id:client-1 ns2 => ns1"
463 # Capture events on the network namespace running the client
466 # RM_ADDR from the server to client machine
467 ip netns exec "$ns1" ./pm_nl_ctl rem token "$server4_token" id\
469 print_test "RM_ADDR id:server ns1 => ns2"
473 # RM_ADDR from the server to client machine
475 server_addr_id=$(( server_addr_id - 1 ))
476 ip netns exec "$ns1" ./pm_nl_ctl rem token "$server4_token" id\
478 print_test "RM_ADDR id:server-1 ns1 => ns2"
482 # RM_ADDR6 from the server to client machine
484 ip netns exec "$ns1" ./pm_nl_ctl rem token "$server6_token" id\
486 print_test "RM_ADDR6 id:server-1 ns1 => ns2"
517 if [ "${e_dport}" -ge "${app4_port}" ] && [ "${e_dport}" -le "${app6_port}" ]; then
565 # Attempt to add a listener at 10.0.2.2:<subflow-port>
570 # ADD_ADDR from client to server machine reusing the subflow port
571 ip netns exec "$ns2" ./pm_nl_ctl ann 10.0.2.2 token "$client4_token" id\
575 # CREATE_SUBFLOW from server to client machine
583 # Delete the listener from the client ns, if one was created
589 # DESTROY_SUBFLOW from server to client machine
597 # RM_ADDR from client to server machine
598 ip netns exec "$ns2" ./pm_nl_ctl rem id $client_addr_id token\
602 # Attempt to add a listener at dead:beef:2::2:<subflow-port>
607 # ADD_ADDR6 from client to server machine reusing the subflow port
609 ip netns exec "$ns2" ./pm_nl_ctl ann dead:beef:2::2 token "$client6_token" id\
613 # CREATE_SUBFLOW6 from server to client machine
622 # Delete the listener from the client ns, if one was created
627 # DESTROY_SUBFLOW6 from server to client machine
636 # RM_ADDR from client to server machine
637 ip netns exec "$ns2" ./pm_nl_ctl rem id $client_addr_id token\
641 # Attempt to add a listener at 10.0.2.2:<new-port>
646 # ADD_ADDR from client to server machine using a new port
648 ip netns exec "$ns2" ./pm_nl_ctl ann 10.0.2.2 token "$client4_token" id\
652 # CREATE_SUBFLOW from server to client machine
661 # Delete the listener from the client ns, if one was created
666 # DESTROY_SUBFLOW from server to client machine
674 # RM_ADDR from client to server machine
675 ip netns exec "$ns2" ./pm_nl_ctl rem id $client_addr_id token\
678 # Capture events on the network namespace running the client
681 # Attempt to add a listener at 10.0.2.1:<subflow-port>
686 # ADD_ADDR from server to client machine reusing the subflow port
687 ip netns exec "$ns1" ./pm_nl_ctl ann 10.0.2.1 token "$server4_token" id\
691 # CREATE_SUBFLOW from client to server machine
704 # DESTROY_SUBFLOW from client to server machine
712 # RM_ADDR from server to client machine
713 ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\
717 # Attempt to add a listener at dead:beef:2::1:<subflow-port>
722 # ADD_ADDR6 from server to client machine reusing the subflow port
724 ip netns exec "$ns1" ./pm_nl_ctl ann dead:beef:2::1 token "$server6_token" id\
728 # CREATE_SUBFLOW6 from client to server machine
743 # DESTROY_SUBFLOW6 from client to server machine
751 # RM_ADDR6 from server to client machine
752 ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\
756 # Attempt to add a listener at 10.0.2.1:<new-port>
761 # ADD_ADDR from server to client machine using a new port
763 ip netns exec "$ns1" ./pm_nl_ctl ann 10.0.2.1 token "$server4_token" id\
767 # CREATE_SUBFLOW from client to server machine
780 # DESTROY_SUBFLOW from client to server machine
788 # RM_ADDR from server to client machine
789 ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\
797 # Attempt to add a listener at 10.0.2.1:<subflow-port>
802 # ADD_ADDR4 from server to client machine reusing the subflow port on
805 ip netns exec "$ns1" ./pm_nl_ctl ann 10.0.2.1 token "$server6_token" id\
807 print_test "ADD_ADDR4 id:server 10.0.2.1 (ns1) => ns2, reuse port"
812 # CREATE_SUBFLOW from client to server machine
826 # DESTROY_SUBFLOW from client to server machine
835 # RM_ADDR from server to client machine
836 ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\
847 # Send MP_PRIO signal from client to server machine
854 if [ -z "$count" ]; then
865 if [ -z "$count" ]; then
893 # Capture events on the network namespace running the client
896 # Attempt to add a listener at 10.0.2.2:<subflow-port>
902 print_test "CREATE_LISTENER 10.0.2.2 (client port)"
905 # ADD_ADDR from client to server machine reusing the subflow port
906 ip netns exec $ns2 ./pm_nl_ctl ann 10.0.2.2 token $client4_token id\
910 # CREATE_SUBFLOW from server to client machine
915 # Delete the listener from the client ns, if one was created
919 print_test "CLOSE_LISTENER 10.0.2.2 (client port)"
926 print_title "Will be using address IDs ${client_addr_id} (client) and ${server_addr_id} (server)"