summaryrefslogtreecommitdiffstats
path: root/test/test_ipsec_tun_if_esp.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-03-28 08:56:10 +0000
committerDamjan Marion <dmarion@me.com>2019-03-29 11:10:33 +0000
commitd7603d97e046d59aba6864b208c181b39fc72b52 (patch)
treeae68418e3987cf2e849df482e3aa3563f42b8f1c /test/test_ipsec_tun_if_esp.py
parent74b7437bd118e104f50831f8a8f3cc8d10aa2530 (diff)
IPSEC: tunnel fragmentation
Change-Id: I63741a22bc82f5f861e1c0f26a93b5569cc52061 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/test_ipsec_tun_if_esp.py')
-rw-r--r--test/test_ipsec_tun_if_esp.py34
1 files changed, 23 insertions, 11 deletions
diff --git a/test/test_ipsec_tun_if_esp.py b/test/test_ipsec_tun_if_esp.py
index e9894a9f340..5af37bfac73 100644
--- a/test/test_ipsec_tun_if_esp.py
+++ b/test/test_ipsec_tun_if_esp.py
@@ -20,21 +20,22 @@ class TemplateIpsec4TunIfEsp(TemplateIpsec):
self.tun_if = self.pg0
p = self.ipv4_params
- tun_if = VppIpsecTunInterface(self, self.pg0, p.vpp_tun_spi,
- p.scapy_tun_spi, p.crypt_algo_vpp_id,
- p.crypt_key, p.crypt_key,
- p.auth_algo_vpp_id, p.auth_key,
- p.auth_key)
- tun_if.add_vpp_config()
- tun_if.admin_up()
- tun_if.config_ip4()
- tun_if.config_ip6()
+
+ p.tun_if = VppIpsecTunInterface(self, self.pg0, p.vpp_tun_spi,
+ p.scapy_tun_spi, p.crypt_algo_vpp_id,
+ p.crypt_key, p.crypt_key,
+ p.auth_algo_vpp_id, p.auth_key,
+ p.auth_key)
+ p.tun_if.add_vpp_config()
+ p.tun_if.admin_up()
+ p.tun_if.config_ip4()
+ p.tun_if.config_ip6()
VppIpRoute(self, p.remote_tun_if_host, 32,
- [VppRoutePath(tun_if.remote_ip4,
+ [VppRoutePath(p.tun_if.remote_ip4,
0xffffffff)]).add_vpp_config()
VppIpRoute(self, p.remote_tun_if_host6, 128,
- [VppRoutePath(tun_if.remote_ip6,
+ [VppRoutePath(p.tun_if.remote_ip6,
0xffffffff,
proto=DpoProto.DPO_PROTO_IP6)],
is_ip6=1).add_vpp_config()
@@ -58,6 +59,17 @@ class TestIpsec4TunIfEsp1(TemplateIpsec4TunIfEsp, IpsecTun4Tests):
""" ipsec 6o4 tunnel basic test """
self.verify_tun_64(self.params[socket.AF_INET], count=257)
+ def test_tun_basic_frag44(self):
+ """ ipsec 4o4 tunnel frag basic test """
+ p = self.ipv4_params
+
+ self.vapi.sw_interface_set_mtu(p.tun_if.sw_if_index,
+ [1500, 0, 0, 0])
+ self.verify_tun_44(self.params[socket.AF_INET],
+ count=1, payload_size=1800, n_rx=2)
+ self.vapi.sw_interface_set_mtu(p.tun_if.sw_if_index,
+ [9000, 0, 0, 0])
+
class TestIpsec4TunIfEsp2(TemplateIpsec4TunIfEsp, IpsecTcpTests):
""" Ipsec ESP - TCP tests """