diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py index b1bde030..2baa645c 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py @@ -508,7 +508,13 @@ class STLStream(object): def to_code (self): """ convert to Python code as profile """ packet = Ether(self.pkt) - packet.hide_defaults() + layer = packet + while layer: # remove checksums + for chksum_name in ('cksum', 'chksum'): + if chksum_name in layer.fields: + del layer.fields[chksum_name] + layer = layer.payload + packet.hide_defaults() # remove fields with default values payload = packet.getlayer('Raw') packet_command = packet.command() imports_arr = [] |