Skip to content

Commit 1f3cffd

Browse files
Geliang Tangintel-lab-lkp
authored andcommitted
selftests: mptcp: userspace: send RM_ADDR between server and client
Now address entries only be removed from local_addr_list when sending a REMOVE_ADDR by the userspace PM, they're no longer removed when a subflow is deleted. To make the original userspace PM selftests pass, this patch sends RM_ADDR from server to client machine at the end of each test, and always sends RM_ADDR from client to server machine to cleanup address IDs for the next new test. Signed-off-by: Geliang Tang <[email protected]>
1 parent 1cff6bb commit 1f3cffd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tools/testing/selftests/net/mptcp/userspace_pm.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,8 @@ test_subflows()
633633
"dead:beef:2::1" "dead:beef:2::2" "$client6_port" "23"\
634634
"$client_addr_id" "ns1" "ns2"
635635

636+
# RM_ADDR from server to client machine
637+
ip netns exec "$ns1" ./pm_nl_ctl rem id 23 token "$server6_token"
636638
# RM_ADDR from client to server machine
637639
ip netns exec "$ns2" ./pm_nl_ctl rem id $client_addr_id token\
638640
"$client6_token"
@@ -671,6 +673,8 @@ test_subflows()
671673
verify_subflow_events "$server_evts" "$SUB_CLOSED" "$server4_token" "$AF_INET" "10.0.2.1"\
672674
"10.0.2.2" "$new4_port" "23" "$client_addr_id" "ns1" "ns2"
673675

676+
# RM_ADDR from server to client machine
677+
ip netns exec "$ns1" ./pm_nl_ctl rem id 23 token "$server4_token"
674678
# RM_ADDR from client to server machine
675679
ip netns exec "$ns2" ./pm_nl_ctl rem id $client_addr_id token\
676680
"$client4_token"
@@ -712,6 +716,8 @@ test_subflows()
712716
# RM_ADDR from server to client machine
713717
ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\
714718
"$server4_token"
719+
# RM_ADDR from client to server machine
720+
ip netns exec "$ns2" ./pm_nl_ctl rem id 23 token "$client4_token"
715721
sleep 0.5
716722

717723
# Attempt to add a listener at dead:beef:2::1:<subflow-port>
@@ -751,6 +757,8 @@ test_subflows()
751757
# RM_ADDR6 from server to client machine
752758
ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\
753759
"$server6_token"
760+
# RM_ADDR6 from client to server machine
761+
ip netns exec "$ns2" ./pm_nl_ctl rem id 23 token "$client6_token"
754762
sleep 0.5
755763

756764
# Attempt to add a listener at 10.0.2.1:<new-port>
@@ -788,6 +796,8 @@ test_subflows()
788796
# RM_ADDR from server to client machine
789797
ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\
790798
"$server4_token"
799+
# RM_ADDR from client to server machine
800+
ip netns exec "$ns2" ./pm_nl_ctl rem id 23 token "$client4_token"
791801
}
792802

793803
test_subflows_v4_v6_mix()
@@ -835,6 +845,8 @@ test_subflows_v4_v6_mix()
835845
# RM_ADDR from server to client machine
836846
ip netns exec "$ns1" ./pm_nl_ctl rem id $server_addr_id token\
837847
"$server6_token"
848+
# RM_ADDR from client to server machine
849+
ip netns exec "$ns2" ./pm_nl_ctl rem id 23 token "$client6_token"
838850
sleep 0.5
839851
}
840852

0 commit comments

Comments
 (0)