selftests: mptcp: ADD_ADDR echo test with missing userspace daemon
authorMat Martineau <mathew.j.martineau@linux.intel.com>
Mon, 2 May 2022 20:52:32 +0000 (13:52 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 May 2022 23:54:54 +0000 (16:54 -0700)
Check userspace PM behavior to ensure ADD_ADDR echoes are only sent when
there is an active userspace daemon. If the daemon is restarting or
hasn't loaded yet, the missing echo will cause the peer to retransmit
the ADD_ADDR - and hopefully the daemon will be ready to receive it at
that later time.

Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh

index b27854f..d1de1e7 100755 (executable)
@@ -2719,6 +2719,17 @@ userspace_tests()
                chk_add_nr 0 0
        fi
 
+       # userspace pm type does not echo add_addr without daemon
+       if reset "userspace pm no echo w/o daemon"; then
+               set_userspace_pm $ns2
+               pm_nl_set_limits $ns1 0 2
+               pm_nl_set_limits $ns2 0 2
+               pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
+               run_tests $ns1 $ns2 10.0.1.1
+               chk_join_nr 0 0 0
+               chk_add_nr 1 0
+       fi
+
        # userspace pm type rejects join
        if reset "userspace pm type rejects join"; then
                set_userspace_pm $ns1