summaryrefslogtreecommitdiffstats
path: root/test/template_ipsec.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-12-10 13:46:09 +0100
committerDave Barach <openvpp@barachs.net>2018-12-13 14:42:50 +0000
commit14d7e90788f87a4b7b174bb5a67171f8c9a7f842 (patch)
treee89f6b874b29d9d20ea243a635728cacc4d2d85d /test/template_ipsec.py
parent69db1a60846f3e7dea3e1f615c396c356a49532e (diff)
VPP-1522: harden reassembly code
Change-Id: Ib5a20bff7d8a340ecf50bcd4a023d6bf36382ba3 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/template_ipsec.py')
-rw-r--r--test/template_ipsec.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/template_ipsec.py b/test/template_ipsec.py
index 961f63aa59c..d35cf420d37 100644
--- a/test/template_ipsec.py
+++ b/test/template_ipsec.py
@@ -233,9 +233,8 @@ class IpsecTraTests(object):
seq_num=17))
self.send_and_assert_no_replies(self.tra_if, pkt * 17)
- err = self.statistics.get_counter(
- '/err/%s/SA replayed packet' % self.tra4_decrypt_node_name)
- self.assertEqual(err, 17)
+ self.assert_packet_counter_equal(
+ '/err/%s/SA replayed packet' % self.tra4_decrypt_node_name, 17)
# a packet that does not decrypt does not move the window forward
bogus_sa = SecurityAssociation(self.encryption_type,
@@ -248,9 +247,8 @@ class IpsecTraTests(object):
seq_num=350))
self.send_and_assert_no_replies(self.tra_if, pkt * 17)
- err = self.statistics.get_counter(
- '/err/%s/Integrity check failed' % self.tra4_decrypt_node_name)
- self.assertEqual(err, 17)
+ self.assert_packet_counter_equal(
+ '/err/%s/Integrity check failed' % self.tra4_decrypt_node_name, 17)
# which we can determine since this packet is still in the window
pkt = (Ether(src=self.tra_if.remote_mac,
@@ -259,7 +257,7 @@ class IpsecTraTests(object):
dst=self.tra_if.local_ip4) /
ICMP(),
seq_num=234))
- recv_pkts = self.send_and_expect(self.tra_if, [pkt], self.tra_if)
+ self.send_and_expect(self.tra_if, [pkt], self.tra_if)
# move the security-associations seq number on to the last we used
p.scapy_tra_sa.seq_num = 351