summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-04-18 19:49:13 -0700
committerDave Wallace <dwallacelf@gmail.com>2019-04-19 18:29:19 +0000
commit1b582b8e9264ca2514a5118ca0de0a3a5b8f5ba4 (patch)
treeeeb42ff6223d4e37869f94308379bd4ca460ea09 /test
parent1b52ca965c907812f8279dfeeee95341f15b3439 (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 17470d93e3a..3a978205b1e 100644
--- a/test/template_ipsec.py
+++ b/test/template_ipsec.py
@@ -412,6 +412,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)
@@ -534,6 +536,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):