summaryrefslogtreecommitdiffstats
path: root/test/template_ipsec.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/template_ipsec.py')
-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):