summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-07-19 09:34:22 +0200
committerGitHub <noreply@github.com>2023-07-19 09:34:22 +0200
commita5fd7c84a12aeb2b5312267c255e792e2b39adb7 (patch)
treebb84ac3bc66237246563e35e4b391fe8c567a5f3
parentf14a98b613b01aa12a5ab39682054494850d1043 (diff)
parentce72574ed5ff34acc9eaee8bde08792d6f265705 (diff)
downloadvyos-1x-a5fd7c84a12aeb2b5312267c255e792e2b39adb7.tar.gz
vyos-1x-a5fd7c84a12aeb2b5312267c255e792e2b39adb7.zip
Merge pull request #2096 from nicolas-fort/T4497
T4497: ping: andd option to force ipv4 or ipv6 (-4 | -6)
-rwxr-xr-xsrc/op_mode/ping.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/op_mode/ping.py b/src/op_mode/ping.py
index 934cfdb52..f1d87a118 100755
--- a/src/op_mode/ping.py
+++ b/src/op_mode/ping.py
@@ -90,6 +90,16 @@ options = {
'type': '<seconds>',
'help': 'Number of seconds to wait between requests'
},
+ 'ipv4': {
+ 'ping': '{command} -4',
+ 'type': 'noarg',
+ 'help': 'Use IPv4 only'
+ },
+ 'ipv6': {
+ 'ping': '{command} -6',
+ 'type': 'noarg',
+ 'help': 'Use IPv6 only'
+ },
'mark': {
'ping': '{command} -m {value}',
'type': '<fwmark>',