summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2021-09-05 04:43:29 -0500
committerDaniil Baturin <daniil@vyos.io>2021-09-05 05:24:11 -0500
commite211cdbb375dba13af33d6ad6c3addab707f2870 (patch)
tree40012142de3ab378b89bbe58eae0fa3f1edb8ee9 /src
parent5e1f76d16332a917bfd99c6f2bffcd73e61d934d (diff)
downloadvyos-1x-e211cdbb375dba13af33d6ad6c3addab707f2870.tar.gz
vyos-1x-e211cdbb375dba13af33d6ad6c3addab707f2870.zip
T3803: add source-address option to the op mode ping CLI.
Diffstat (limited to 'src')
-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
+