@@ -461,9 +461,23 @@ check_mptcp_disabled
check_mptcp_ulp_setsockopt
+show_all_ipv6()
+{
+ local ns
+ for ns in "$ns1" "$ns2" "$ns3" "$ns4"; do
+ ip -net "${ns}" -6 addr show scope global
+ done
+}
+
# Allow DAD to finish
-$ipv6 && sleep 2
+if $ipv6; then
+ for dad in $(seq 20); do
+ show_all_ipv6 | grep -q -e tentative -e temporary || break
+ sleep 0.1
+ done
+fi
+echo "INFO: validating network environment with pings"
for sender in "$ns1" "$ns2" "$ns3" "$ns4";do
do_ping "$ns1" $sender 10.0.1.1
if $ipv6;then
We can use 'ip addr' to know if everything is setup. In my test, DAD has already finished when checking the first time. Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> --- Notes: to be squashed in "mptcp: add basic kselftest for mptcp" .../testing/selftests/net/mptcp/mptcp_connect.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)