Skip to content

Commit 19d7100

Browse files
fun2yangpevik
authored andcommitted
route/route6-change-gw: Fix error "RTNETLINK answers: File exists"
Use ip route change instead of adding and deleting route (the same approach route4-change-gw uses). This prevents occasional rtnetlink error "RTNETLINK answers: File exists" when route already exists. Signed-off-by:jian yang <[email protected]> [pvorel: adjusted commit message] Signed-off-by: Petr Vorel <[email protected]>
1 parent a78e154 commit 19d7100

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

testcases/network/stress/route/route6-change-gw

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ test_body()
245245
route -A inet6 del ${dst_network}/64 gw ${IPV6_NETWORK}:${pre_rhost_part_hex} dev $lhost_ifname
246246
;;
247247
2)
248-
ip -f inet6 route add ${dst_network}/64 via ${IPV6_NETWORK}:${rhost_part_hex} dev $lhost_ifname
249-
ip -f inet6 route del ${dst_network}/64 via ${IPV6_NETWORK}:${pre_rhost_part_hex} dev $lhost_ifname
248+
ip -f inet6 route change ${dst_network}/64 via ${IPV6_NETWORK}:${rhost_part_hex} dev $lhost_ifname
250249
;;
251250
esac
252251
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)