aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-04-18 19:49:13 -0700
committerNeale Ranns <nranns@cisco.com>2019-04-19 04:02:59 +0000
commit84ac8ac369bbe788a3f4eeb913f7927596f696af (patch)
treea30d3ca3d08ab295bbc4ebd31df4b99731dc69b2 /test
parent9fdfcf32741551a0eaf11a27d822a9d8f0607832 (diff)
IPSEC: IPv6 ESP transport mode incorrect packet length and checksum (VPP-1654)
Change-Id: Ia3474e5bfea5764eae9b2987bf78296535df6778 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/template_ipsec.py4
1 files changed, 4 insertions, 0 deletions
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):