summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-09-13 15:26:27 +0300
committerHanoh Haim <hhaim@cisco.com>2016-09-13 19:37:29 +0300
commit9df89870d053a01a8b65afc1484db6185309ddd8 (patch)
treed4508df995d3a1499664fc78795b0b1130b7fb2d /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
parentb424cd3de89ce5dbf67b349d3fe9ffe15b521452 (diff)
fix random_limit max value
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
index 5f3a0078..079a8d3c 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py
@@ -751,9 +751,9 @@ class STLVmFlowVarRepetableRandom(CTRexVmDescBase):
self.min_value = convert_val (min_value);
if max_value == None :
- max_value = get_max_by_size()
-
- self.max_value = get_max_by_size (self.size)
+ self.max_value = get_max_by_size (self.size)
+ else:
+ self.max_value = convert_val (max_value)
if self.min_value > self.max_value :
raise CTRexPacketBuildException(-11,("max %d is lower than min %d ") % (self.max_value,self.min_value) );