X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_ipsec_tun_interface.py;h=7f11b7ebb1aaf5d64c203c8d4665c196aca913f1;hb=12989b538;hp=c427936fa087274d2a9fbf30ddab3e6eff70521f;hpb=3593a9174a8e9faddb8d4eb451d1b4632c1e0df1;p=vpp.git diff --git a/test/vpp_ipsec_tun_interface.py b/test/vpp_ipsec_tun_interface.py index c427936fa08..7f11b7ebb1a 100644 --- a/test/vpp_ipsec_tun_interface.py +++ b/test/vpp_ipsec_tun_interface.py @@ -8,7 +8,10 @@ class VppIpsecTunInterface(VppTunnelInterface): def __init__(self, test, parent_if, local_spi, remote_spi, crypto_alg, local_crypto_key, remote_crypto_key, - integ_alg, local_integ_key, remote_integ_key, is_ip6=False): + integ_alg, local_integ_key, remote_integ_key, salt=0, + udp_encap=False, + is_ip6=False, + dst=None): super(VppIpsecTunInterface, self).__init__(test, parent_if) self.local_spi = local_spi self.remote_spi = remote_spi @@ -18,19 +21,25 @@ class VppIpsecTunInterface(VppTunnelInterface): self.integ_alg = integ_alg self.local_integ_key = local_integ_key self.remote_integ_key = remote_integ_key + self.salt = salt if is_ip6: self.local_ip = self.parent_if.local_ip6 self.remote_ip = self.parent_if.remote_ip6 else: self.local_ip = self.parent_if.local_ip4 self.remote_ip = self.parent_if.remote_ip4 + if dst: + self.remote_ip = dst + self.udp_encap = udp_encap def add_vpp_config(self): r = self.test.vapi.ipsec_tunnel_if_add_del( self.local_ip, self.remote_ip, self.remote_spi, self.local_spi, self.crypto_alg, self.local_crypto_key, self.remote_crypto_key, - self.integ_alg, self.local_integ_key, self.remote_integ_key) + self.integ_alg, self.local_integ_key, self.remote_integ_key, + salt=self.salt, + udp_encap=self.udp_encap) self.set_sw_if_index(r.sw_if_index) self.generate_remote_hosts() self.test.registry.register(self, self.test.logger)