diff options
author | Anton Kiselev <anton.kisel@gmail.com> | 2016-11-18 13:50:35 +0700 |
---|---|---|
committer | Anton Kiselev <anton.kisel@gmail.com> | 2016-11-18 13:56:56 +0700 |
commit | b75910ef6bb781b0d28eb253758bbe65d573b768 (patch) | |
tree | 2f331153d91ccc3f53698362c01ff8d53876956c /scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_service.py | |
parent | ae863c50263aa79391d4b81238c19a4b920ecc47 (diff) |
scapy_service: take into account Ether.chksum when building payload with total_size
Signed-off-by: Anton Kiselev <anton.kisel@gmail.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_service.py')
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_service.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_service.py b/scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_service.py index 88514aa8..8d99fe92 100755 --- a/scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_service.py +++ b/scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_service.py @@ -468,7 +468,8 @@ class Scapy_service(Scapy_service_api): gen.update(val) total_sz = gen['total_size'] del gen['total_size'] - gen['size'] = total_sz - len(scapy_pkt) + ether_chksum_size_bytes = 4 # will be added outside of Scapy. needs to be excluded here + gen['size'] = total_sz - len(scapy_pkt) - ether_chksum_size_bytes return generate_bytes(gen) else: return generate_bytes(val) |