From 8c1328e33ea100886cfc557d8d701b24af90bcff Mon Sep 17 00:00:00 2001 From: Seth Forshee Date: Wed, 20 Feb 2019 22:11:18 +0100 Subject: [PATCH] UBUNTU: SAUCE: selftests: pmtu: disable accept_dad for tests The pmtu_ipv6_exception can fail if IPv6 DAD has not completd by the time the test attempts to make use of the interface. Prevent this by disabling DAD on the interfaces. Signed-off-by: Seth Forshee --- tools/testing/selftests/net/pmtu.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/pmtu.sh b/tools/testing/selftests/net/pmtu.sh index ab367e75f095..b390970e56ad 100755 --- a/tools/testing/selftests/net/pmtu.sh +++ b/tools/testing/selftests/net/pmtu.sh @@ -531,6 +531,7 @@ setup_routing() { for i in ${NS_R1} ${NS_R2}; do ip netns exec ${i} sysctl -q net/ipv4/ip_forward=1 ip netns exec ${i} sysctl -q net/ipv6/conf/all/forwarding=1 + ip netns exec ${i} sysctl -q -w net.ipv6.conf.all.accept_dad=0 done for i in ${routing_addrs}; do @@ -544,7 +545,10 @@ setup_routing() { ifpeer="veth_${peer}-${ns}" # Create veth links - ip link add ${if} up netns ${ns_name} type veth peer name ${ifpeer} netns ${peer_name} || return 1 + ip link add ${if} netns ${ns_name} type veth peer name ${ifpeer} netns ${peer_name} || return 1 + ip netns exec ${ns_name} sysctl -q -w net.ipv6.conf.${if}.accept_dad=0 + ip netns exec ${peer_name} sysctl -q -w net.ipv6.conf.${ifpeer}.accept_dad=0 + ip -n ${ns_name} link set dev ${if} up ip -n ${peer_name} link set dev ${ifpeer} up # Add addresses -- 2.39.5