X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftemplate_ipsec.py;h=a4f998ee84e1af7cd43c0347ac9a25a555f54f1e;hb=2fd44a00aa26188ca75f0accd734f21758c199bf;hp=773531fe038f78047fb77f67fd7b39f7026bb907;hpb=1404698df397bc4d3007daea41f52ad75ed4486c;p=vpp.git diff --git a/test/template_ipsec.py b/test/template_ipsec.py index 773531fe038..a4f998ee84e 100644 --- a/test/template_ipsec.py +++ b/test/template_ipsec.py @@ -317,6 +317,21 @@ class IpsecTra4(object): replay_count += len(pkts) self.assert_error_counter_equal(replay_node_name, replay_count) + # + # now send a batch of packets all with the same sequence number + # the first packet in the batch is legitimate, the rest bogus + # + pkts = (Ether(src=self.tra_if.remote_mac, + dst=self.tra_if.local_mac) / + p.scapy_tra_sa.encrypt(IP(src=self.tra_if.remote_ip4, + dst=self.tra_if.local_ip4) / + ICMP(), + seq_num=35)) + recv_pkts = self.send_and_expect(self.tra_if, pkts * 8, + self.tra_if, n_rx=1) + replay_count += 7 + self.assert_error_counter_equal(replay_node_name, replay_count) + # # now move the window over to 257 (more than one byte) and into Case A # @@ -364,7 +379,7 @@ class IpsecTra4(object): # a malformed 'runt' packet # created by a mis-constructed SA - if (ESP == self.encryption_type): + if (ESP == self.encryption_type and p.crypt_algo != "NULL"): bogus_sa = SecurityAssociation(self.encryption_type, p.vpp_tra_spi) pkt = (Ether(src=self.tra_if.remote_mac,