summaryrefslogtreecommitdiffstats
path: root/scripts/automation
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-02-22 13:48:14 +0200
committerimarom <imarom@cisco.com>2017-02-22 13:49:23 +0200
commit97144e5554fdd9f5ca71e8086154031f6d2435eb (patch)
tree7de5893d333c3e91a4787452d8847224052f1e33 /scripts/automation
parent74a55c270b465ae6e0ec36d58a1f2f4b0e132e00 (diff)
fix for https://trex-tgn.cisco.com/youtrack/issue/trex-358
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py7
1 files changed, 3 insertions, 4 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 679068ac..edd3d91e 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
@@ -485,7 +485,7 @@ class CTRexScapyPktUtl(object):
for pkt in self.pkt_iter ():
if pkt.name == name:
if cnt==0:
- return (pkt, pkt.offset)
+ return (pkt, pkt._offset)
else:
cnt=cnt -1
@@ -500,7 +500,7 @@ class CTRexScapyPktUtl(object):
for pkt in self.pkt_iter ():
if pkt.name == name:
if cnt==0:
- return pkt.offset
+ return pkt._offset
else:
cnt=cnt -1
@@ -513,12 +513,11 @@ class CTRexScapyPktUtl(object):
t=self._layer_offset(layer,layer_cnt);
l_offset=t[1];
layer_pkt=t[0]
-
#layer_pkt.dump_fields_offsets ()
for f in layer_pkt.fields_desc:
if f.name == field_name:
- return (l_offset+f.offset,f.get_size_bytes ());
+ return (l_offset+f._offset,f.get_size_bytes ());
raise CTRexPacketBuildException(-11, "No layer %s-%d." % (field_name, layer_cnt))