summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/utils')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py2
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py
index d4ac973d..02e13fd7 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py
@@ -92,7 +92,7 @@ def is_valid_ipv4 (addr):
try:
socket.inet_pton(socket.AF_INET, addr)
return True
- except socket.error:
+ except (socket.error, TypeError):
return False
def is_valid_mac (mac):
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py
index 80260d4a..97c9035a 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py
@@ -52,6 +52,7 @@ PORT_RESTART = 34
IPV4 = 35
DEST = 36
+RETRIES = 37
GLOBAL_STATS = 50
PORT_STATS = 51
@@ -344,6 +345,12 @@ OPTIONS_DB = {MULTIPLIER: ArgumentPack(['-m', '--multiplier'],
'default': None,
'type': check_dest_addr}),
+ RETRIES: ArgumentPack(['-r', '--retries'],
+ {'help': 'retries count [default is zero]',
+ 'dest': 'retries',
+ 'default': 0,
+ 'type': int}),
+
OUTPUT_FILENAME: ArgumentPack(['-o', '--output'],
{'help': 'Output PCAP filename',