[LTP] [PATCH v2] route: fix double add the same route
Sun Lianwen
sunlw.fnst@cn.fujitsu.com
Sat Jun 23 04:11:03 CEST 2018
"route -A inet6 add ${dst_network}/64 gw ${IPV6_NETWORK}:${rhost_part_hex} dev $lhost_ifname
route -A inet6 del ${dst_network}/64 gw ${IPV6_NETWORK}:${pre_rhost_part_hex} dev $lhost_ifname"
can't complete delete the have already added test route, This can result to add the same route
when exec "ip -f inet6 route add ${dst_network}/64 via ${IPV6_NETWORK}:${rhost_part_hex} dev
$lhost_ifname" and report error "RTNETLINK answers: File exists"
Signed-off-by: Sun Lianwen <sunlw.fnst@cn.fujitsu.com>
---
testcases/network/stress/route/route6-change-gw | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/testcases/network/stress/route/route6-change-gw b/testcases/network/stress/route/route6-change-gw
index 96fd7ee66..be819f1c2 100644
--- a/testcases/network/stress/route/route6-change-gw
+++ b/testcases/network/stress/route/route6-change-gw
@@ -245,8 +245,7 @@ test_body()
route -A inet6 del ${dst_network}/64 gw ${IPV6_NETWORK}:${pre_rhost_part_hex} dev $lhost_ifname
;;
2)
- ip -f inet6 route add ${dst_network}/64 via ${IPV6_NETWORK}:${rhost_part_hex} dev $lhost_ifname
- ip -f inet6 route del ${dst_network}/64 via ${IPV6_NETWORK}:${pre_rhost_part_hex} dev $lhost_ifname
+ ip -f inet6 route change ${dst_network}/64 via ${IPV6_NETWORK}:${rhost_part_hex} dev $lhost_ifname
;;
esac
if [ $? -ne 0 ]; then
--
2.17.1
More information about the ltp
mailing list