diff options
author | Petr Machata <petrm@mellanox.com> | 2018-11-19 19:11:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-20 04:59:43 +0300 |
commit | d20b0f214aa74a3f6b28b8d522f273e1fd2abea3 (patch) | |
tree | 404edddb925340f26ce219a8841fbd33715858df /tools | |
parent | 58c7a2d19e90a6ec3fbe6cd0c6b1025b731bc000 (diff) | |
download | linux-d20b0f214aa74a3f6b28b8d522f273e1fd2abea3.tar.xz |
selftests: forwarding: ping{6, }_do(): Allow passing ping arguments
Make the ping routine more generic by allowing passing arbitrary ping
command-line arguments.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/net/forwarding/lib.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index fa734ddce2e9..e916663a1019 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -801,10 +801,11 @@ ping_do() { local if_name=$1 local dip=$2 + local args=$3 local vrf_name vrf_name=$(master_name_get $if_name) - ip vrf exec $vrf_name $PING $dip -c 10 -i 0.1 -w 2 &> /dev/null + ip vrf exec $vrf_name $PING $args $dip -c 10 -i 0.1 -w 2 &> /dev/null } ping_test() @@ -820,10 +821,11 @@ ping6_do() { local if_name=$1 local dip=$2 + local args=$3 local vrf_name vrf_name=$(master_name_get $if_name) - ip vrf exec $vrf_name $PING6 $dip -c 10 -i 0.1 -w 2 &> /dev/null + ip vrf exec $vrf_name $PING6 $args $dip -c 10 -i 0.1 -w 2 &> /dev/null } ping6_test() |