aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/IPsecUtil.py
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-11-30 17:27:08 +0000
committerPeter Mikus <pmikus@cisco.com>2019-11-30 17:34:08 +0000
commit0c6c98846b86a45ac85aea88726ea6b80a27d00a (patch)
treef402c8c44af20ddd3a03499b4999d6de3d3c5c8a /resources/libraries/python/IPsecUtil.py
parentd68951ac245150eeefa6e0f4156e4c1b5c9e9325 (diff)
FIX: IPsec naming creation
Change-Id: I066a8b85649654c1c575eb63722de6c51f3d4f78 Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/python/IPsecUtil.py')
-rw-r--r--resources/libraries/python/IPsecUtil.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/resources/libraries/python/IPsecUtil.py b/resources/libraries/python/IPsecUtil.py
index 9237769d45..e08b3207ac 100644
--- a/resources/libraries/python/IPsecUtil.py
+++ b/resources/libraries/python/IPsecUtil.py
@@ -844,7 +844,8 @@ class IPsecUtil:
f"local_crypto_key {ckey} remote_crypto_key {ckey} "
f"{integ} "
f"local_ip {if1_ip + i * addr_incr} "
- f"remote_ip {if2_ip}\n"
+ f"remote_ip {if2_ip} "
+ f"instance {i}\n"
)
tmp_f2.write(
f"ipsec_tunnel_if_add_del "
@@ -853,7 +854,8 @@ class IPsecUtil:
f"local_crypto_key {ckey} remote_crypto_key {ckey} "
f"{integ} "
f"local_ip {if2_ip} "
- f"remote_ip {if1_ip + i * addr_incr}\n"
+ f"remote_ip {if1_ip + i * addr_incr} "
+ f"instance {i}\n"
)
vat.execute_script(
tmp_fn1, nodes[u"DUT1"], timeout=1800, json_out=False,
@@ -875,16 +877,16 @@ class IPsecUtil:
)
for i in range(n_tunnels):
tmp_f1.write(
- f"exec set interface unnumbered ipsec{i} use {if1_n}\n"
- f"exec set interface state ipsec{i} up\n"
+ f"exec set interface unnumbered ipip{i} use {if1_n}\n"
+ f"exec set interface state ipip{i} up\n"
f"exec ip route add {raddr_ip2 + i}/{mask2} "
- f"via ipsec{i}\n"
+ f"via ipip{i}\n"
)
tmp_f2.write(
- f"exec set interface unnumbered ipsec{i} use {if2_n}\n"
- f"exec set interface state ipsec{i} up\n"
+ f"exec set interface unnumbered ipip{i} use {if2_n}\n"
+ f"exec set interface state ipip{i} up\n"
f"exec ip route add {raddr_ip1 + i}/{mask2} "
- f"via ipsec{i}\n"
+ f"via ipip{i}\n"
)
vat.execute_script(
tmp_fn1, nodes[u"DUT1"], timeout=1800, json_out=False,