diff mbox series

[2/2] lib/tst_net.sh: disable ipv6_dad work on test interfaces

Message ID 20210913123935.10761-2-aleksei.kodanev@bell-sw.com
State Accepted
Headers show
Series [1/2] lib/tst_net.sh: ignore errors on rhost with -i option in tst_net_run() | expand

Commit Message

Alexey Kodanev Sept. 13, 2021, 12:39 p.m. UTC
To fix intermittent issues with ping (in flood mode) [1] tests
after initial test interfaces setup.

We're already adding IPv6 addresses with nodad option, but it
should disable ipv6_dad for link-local addresses too, so that
they are fully functional when tests start to use them.

It could also be tst_wait_ipv6_dad(), but it slows down a test
setup.

[1]: https://github.com/iputils/iputils/issues/300

Tested-by: Su Yue <suy.fnst@fujitsu.com>
Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
---
 testcases/lib/tst_net.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

Petr Vorel Sept. 14, 2021, 5:48 a.m. UTC | #1
Hi Alexey,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Thanks!

Kind regards,
Petr
suy.fnst@fujitsu.com Nov. 16, 2021, 9:20 a.m. UTC | #2
Hi,
  Obviously `sysctl -qw net.ipv6.conf.$iface.accept_dad=0` would failed if ipv6 is off.
It caused failures of tests when ipv6 is off in our internal environment.
  No mean to blame the commit, just report the issue : )

Thanks,
Su
diff mbox series

Patch

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 7f2a1bab3..89d4c79ec 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -517,6 +517,7 @@  tst_init_iface()
 		ip link set $iface down || return $?
 		ip route flush dev $iface || return $?
 		ip addr flush dev $iface || return $?
+		sysctl -qw net.ipv6.conf.$iface.accept_dad=0 || return $?
 		ip link set $iface up
 		return $?
 	fi
@@ -528,6 +529,7 @@  tst_init_iface()
 	tst_rhost_run -c "ip link set $iface down" || return $?
 	tst_rhost_run -c "ip route flush dev $iface" || return $?
 	tst_rhost_run -c "ip addr flush dev $iface" || return $?
+	tst_rhost_run -c "sysctl -qw net.ipv6.conf.$iface.accept_dad=0" || return $?
 	tst_rhost_run -c "ip link set $iface up"
 }