Also move iface variable to the function which is using it Signed-off-by: Alexey Kodanev <alexey.koda...@oracle.com> --- testcases/lib/test_net.sh | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/testcases/lib/test_net.sh b/testcases/lib/test_net.sh index d72e84e..acaed84 100644 --- a/testcases/lib/test_net.sh +++ b/testcases/lib/test_net.sh @@ -216,6 +216,8 @@ tst_add_ipaddr() local mask=24 [ "$TST_IPV6" ] && mask=64 + local iface=$(tst_iface $type $link_num) + if [ $type = "lhost" ]; then tst_resm TINFO "set local addr $(tst_ipaddr)/$mask" ip addr add $(tst_ipaddr)/$mask dev $iface || \ @@ -238,8 +240,10 @@ tst_restore_ipaddr() tst_init_iface $type $link_num - local iface=$(tst_iface $type $link_num) + local backup_tst_ipv6=$TST_IPV6 TST_IPV6= tst_add_ipaddr $type $link_num TST_IPV6=6 tst_add_ipaddr $type $link_num + + TST_IPV6=$backup_tst_ipv6 } -- 1.7.1 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list