From 84ac8ac369bbe788a3f4eeb913f7927596f696af Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 18 Apr 2019 19:49:13 -0700 Subject: IPSEC: IPv6 ESP transport mode incorrect packet length and checksum (VPP-1654) Change-Id: Ia3474e5bfea5764eae9b2987bf78296535df6778 Signed-off-by: Neale Ranns --- test/template_ipsec.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/template_ipsec.py b/test/template_ipsec.py index b954af1c824..73ae24a4295 100644 --- a/test/template_ipsec.py +++ b/test/template_ipsec.py @@ -400,6 +400,8 @@ class IpsecTra4(object): recv_pkts = self.send_and_expect(self.tra_if, send_pkts, self.tra_if) for rx in recv_pkts: + self.assertEqual(len(rx) - len(Ether()), rx[IP].len) + self.assert_packet_checksums_valid(rx) try: decrypted = p.vpp_tra_sa.decrypt(rx[IP]) self.assert_packet_checksums_valid(decrypted) @@ -522,6 +524,8 @@ class IpsecTun4(object): def verify_encrypted(self, p, sa, rxs): decrypt_pkts = [] for rx in rxs: + self.assert_packet_checksums_valid(rx) + self.assertEqual(len(rx) - len(Ether()), rx[IP].len) try: decrypt_pkt = p.vpp_tun_sa.decrypt(rx[IP]) if not decrypt_pkt.haslayer(IP): -- cgit 1.2.3-korg