diff options
author | Klement Sekera <klement.sekera@gmail.com> | 2022-11-14 11:26:18 +0100 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2023-01-18 00:39:57 +0000 |
commit | 738cf73b2c5e396a56b8fab19b64a07b171cb14c (patch) | |
tree | c2d75be0284135424300ffeddb07f7b633192362 /src/vcl/vppcom.h | |
parent | cc16e7bad74c18b1a682329af5e760c4cd8381ea (diff) |
tests: improve packet checksum functions
Fool-proof assert_checksum_valid so that one does not verify checksum on
wrong layer (because of how scapy internally works).
Make assert_packet_checksums_valid start checksum checking at inner
layers and outwards to make it more obvious where the error is. With old
behaviour, if one received an ICMP packet carrying a truncated TCP
packet, an error would be raised for ICMP checksum, as that one would be
the first to be wrong after recalculating all packet checksums, while
the real issue is TCP header being truncated and thus unsuitable for use
with this function.
Type: improvement
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I39a2b50ec5610f969cfde9796416ee3a50ae0ba3
Diffstat (limited to 'src/vcl/vppcom.h')
0 files changed, 0 insertions, 0 deletions