summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-05 14:53:46 +0200
committerGitHub <noreply@github.com>2021-09-05 14:53:46 +0200
commitf695a70f85576733e7fa4c5553f8f1cd555f16c3 (patch)
tree40012142de3ab378b89bbe58eae0fa3f1edb8ee9
parent5e1f76d16332a917bfd99c6f2bffcd73e61d934d (diff)
parente211cdbb375dba13af33d6ad6c3addab707f2870 (diff)
downloadvyos-1x-f695a70f85576733e7fa4c5553f8f1cd555f16c3.tar.gz
vyos-1x-f695a70f85576733e7fa4c5553f8f1cd555f16c3.zip
Merge pull request #996 from dmbaturin/ping-source-address
T3803: add source-address option to the op mode ping CLI.
-rwxr-xr-xsrc/op_mode/ping.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/op_mode/ping.py b/src/op_mode/ping.py
index 2144ab53c..60bbc0c78 100755
--- a/src/op_mode/ping.py
+++ b/src/op_mode/ping.py
@@ -62,8 +62,8 @@ options = {
},
'interface': {
'ping': '{command} -I {value}',
- 'type': '<interface> <X.X.X.X> <h:h:h:h:h:h:h:h>',
- 'help': 'Interface to use as source for ping'
+ 'type': '<interface>',
+ 'help': 'Source interface'
},
'interval': {
'ping': '{command} -i {value}',
@@ -115,6 +115,10 @@ options = {
'type': '<bytes>',
'help': 'Number of bytes to send'
},
+ 'source-address': {
+ 'ping': '{command} -I {value}',
+ 'type': '<x.x.x.x> <h:h:h:h:h:h:h:h>',
+ },
'ttl': {
'ping': '{command} -t {value}',
'type': '<ttl>',
@@ -234,4 +238,4 @@ if __name__ == '__main__':
# print(f'{command} {host}')
os.system(f'{command} {host}')
- \ No newline at end of file
+