ipsec: ipsec-tun protect

please consult the new tunnel proposal at:
  https://wiki.fd.io/view/VPP/IPSec

Type: feature

Change-Id: I52857fc92ae068b85f59be08bdbea1bd5932e291
Signed-off-by: Neale Ranns <nranns@cisco.com>
This commit is contained in:
Neale Ranns
2019-02-07 07:26:12 -08:00
committed by Damjan Marion
parent 097fa66b98
commit c87b66c862
47 changed files with 2447 additions and 2125 deletions

View File

@ -51,48 +51,3 @@ class VppIpsecTunInterface(VppTunnelInterface):
def object_id(self):
return "ipsec-tun-if-%d" % self._sw_if_index
class VppIpsecGRETunInterface(VppTunnelInterface):
"""
VPP IPsec GRE Tunnel interface
this creates headers
IP / ESP / IP / GRE / payload
i.e. it's GRE over IPSEC, rather than IPSEC over GRE.
"""
def __init__(self, test, parent_if, sa_out, sa_in):
super(VppIpsecGRETunInterface, self).__init__(test, parent_if)
self.sa_in = sa_in
self.sa_out = sa_out
def add_vpp_config(self):
r = self.test.vapi.ipsec_gre_tunnel_add_del(
self.parent_if.local_ip4n,
self.parent_if.remote_ip4n,
self.sa_out,
self.sa_in)
self.set_sw_if_index(r.sw_if_index)
self.generate_remote_hosts()
self.test.registry.register(self, self.test.logger)
def remove_vpp_config(self):
self.test.vapi.ipsec_gre_tunnel_add_del(
self.parent_if.local_ip4n,
self.parent_if.remote_ip4n,
self.sa_out,
self.sa_in,
is_add=0)
def query_vpp_config(self):
ts = self.test.vapi.ipsec_gre_tunnel_dump(sw_if_index=0xffffffff)
for t in ts:
if t.tunnel.sw_if_index == self._sw_if_index:
return True
return False
def __str__(self):
return self.object_id()
def object_id(self):
return "ipsec-gre-tun-if-%d" % self._sw_if_index