From 97144e5554fdd9f5ca71e8086154031f6d2435eb Mon Sep 17 00:00:00 2001 From: imarom Date: Wed, 22 Feb 2017 13:48:14 +0200 Subject: fix for https://trex-tgn.cisco.com/youtrack/issue/trex-358 Signed-off-by: imarom --- .../stl/trex_stl_lib/trex_stl_packet_builder_scapy.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts/automation') 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)) -- cgit 1.2.3-korg