summaryrefslogtreecommitdiff
path: root/src/op_mode/ping.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/op_mode/ping.py')
-rwxr-xr-xsrc/op_mode/ping.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/op_mode/ping.py b/src/op_mode/ping.py
index 29b430d53..2144ab53c 100755
--- a/src/op_mode/ping.py
+++ b/src/op_mode/ping.py
@@ -50,6 +50,11 @@ options = {
'type': '<seconds>',
'help': 'Number of seconds before ping exits'
},
+ 'do-not-fragment': {
+ 'ping': '{command} -M do',
+ 'type': 'noarg',
+ 'help': 'Set DF-bit flag to 1 for no fragmentation'
+ },
'flood': {
'ping': 'sudo {command} -f',
'type': 'noarg',
@@ -215,6 +220,8 @@ if __name__ == '__main__':
try:
ip = socket.gethostbyname(host)
+ except UnicodeError:
+ sys.exit(f'ping: Unknown host: {host}')
except socket.gaierror:
ip = host
@@ -227,4 +234,4 @@ if __name__ == '__main__':
# print(f'{command} {host}')
os.system(f'{command} {host}')
-
+ \ No newline at end of file