From b75910ef6bb781b0d28eb253758bbe65d573b768 Mon Sep 17 00:00:00 2001 From: Anton Kiselev Date: Fri, 18 Nov 2016 13:50:35 +0700 Subject: scapy_service: take into account Ether.chksum when building payload with total_size Signed-off-by: Anton Kiselev --- .../trex_control_plane/stl/services/scapy_server/scapy_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/automation/trex_control_plane/stl/services/scapy_server/scapy_service.py') 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) -- cgit 1.2.3-korg