diff options
author | Ole Troan <ot@cisco.com> | 2018-06-22 22:36:46 +0200 |
---|---|---|
committer | Ole Troan <ot@cisco.com> | 2018-06-22 22:37:55 +0200 |
commit | e0d2bd6bd7fc59c0c6ac48195d7f825dc99bfd91 (patch) | |
tree | 1b6f7af08cd0ba04001a0da13efb8ba9d937472f /test/framework.py | |
parent | c8efa29b6f9a91381897b54f1147daf922ed7164 (diff) |
Revert "ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums"
This reverts commit a98346f664aae148d26a8e158008b773d73db96f.
Change-Id: Iee5b3a5ddff0e8fd3a30fe5973cee24de434fe12
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r-- | test/framework.py | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/test/framework.py b/test/framework.py index be8c209f4ea..f90197b9b6f 100644 --- a/test/framework.py +++ b/test/framework.py @@ -25,7 +25,6 @@ from vpp_papi_provider import VppPapiProvider from log import RED, GREEN, YELLOW, double_line_delim, single_line_delim, \ getLogger, colorize from vpp_object import VppObjectRegistry -from util import ppp from scapy.layers.inet import IPerror, TCPerror, UDPerror, ICMPerror from scapy.layers.inet6 import ICMPv6DestUnreach, ICMPv6EchoRequest from scapy.layers.inet6 import ICMPv6EchoReply @@ -736,14 +735,11 @@ class VppTestCase(unittest.TestCase): def assert_packet_checksums_valid(self, packet, ignore_zero_udp_checksums=True): - received = packet.__class__(str(packet)) - self.logger.debug( - ppp("Verifying packet checksums for packet:", received)) udp_layers = ['UDP', 'UDPerror'] checksum_fields = ['cksum', 'chksum'] checksums = [] counter = 0 - temp = received.__class__(str(received)) + temp = packet.__class__(str(packet)) while True: layer = temp.getlayer(counter) if layer: @@ -758,17 +754,12 @@ class VppTestCase(unittest.TestCase): else: break counter = counter + 1 - if 0 == len(checksums): - return temp = temp.__class__(str(temp)) for layer, cf in checksums: - calc_sum = getattr(temp[layer], cf) - self.assert_equal( - getattr(received[layer], cf), calc_sum, - "packet checksum on layer #%d: %s" % (layer, temp[layer].name)) - self.logger.debug( - "Checksum field `%s` on `%s` layer has correct value `%s`" % - (cf, temp[layer].name, calc_sum)) + self.assert_equal(getattr(packet[layer], cf), + getattr(temp[layer], cf), + "packet checksum on layer #%d: %s" % ( + layer, temp[layer].name)) def assert_checksum_valid(self, received_packet, layer, field_name='chksum', |