summaryrefslogtreecommitdiffstats
path: root/test/test_ipsec_ah.py
diff options
context:
space:
mode:
authorArthur de Kerhor <arthurdekerhor@gmail.com>2022-11-16 18:45:24 +0100
committerNeale Ranns <neale@graphiant.com>2023-02-06 03:49:14 +0000
commit0df06b6e95b6a3261c8e9c261c7a4a661d6ea25a (patch)
tree16c4f723367566c965bffda369bb1f56dcf566ce /test/test_ipsec_ah.py
parentab412cdc07e19a872037e4034caa522398c4be07 (diff)
ipsec: fix SA names consistency in tests
In some IPsec tests, the SA called scapy_sa designs the SA that encrypts Scapy packets and decrypts them in VPP, and the one called vpp_sa the SA that encrypts VPP packets and decrypts them with Scapy. However, this pattern is not consistent across all tests. Some tests use the opposite logic. Others even mix both correlating scapy_tra_spi with vpp_tra_sa_id and vice-versa. Because of that, sometimes, the SA called vpp_sa_in is used as an outbound SA and vpp_sa_out as an inbound one. This patch forces all the tests to follow the same following logic: - scapy_sa is the SA used to encrypt Scapy packets and decrypt them in VPP. It matches the VPP inbound SA. - vpp_sa is the SA used to encrypt VPP packets and decrypt them in Scapy. It matches the VPP outbound SA. Type: fix Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com> Change-Id: Iadccdccbf98e834add13b5f4ad87af57e2ea3c2a
Diffstat (limited to 'test/test_ipsec_ah.py')
-rw-r--r--test/test_ipsec_ah.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test_ipsec_ah.py b/test/test_ipsec_ah.py
index b23dd3f84f9..f7b8db876bb 100644
--- a/test/test_ipsec_ah.py
+++ b/test/test_ipsec_ah.py
@@ -154,8 +154,8 @@ class ConfigIpsecAH(TemplateIpsec):
crypt_algo_vpp_id,
crypt_key,
self.vpp_ah_protocol,
- self.tun_if.local_addr[addr_type],
self.tun_if.remote_addr[addr_type],
+ self.tun_if.local_addr[addr_type],
tun_flags=tun_flags,
flags=flags,
dscp=params.dscp,
@@ -170,8 +170,8 @@ class ConfigIpsecAH(TemplateIpsec):
crypt_algo_vpp_id,
crypt_key,
self.vpp_ah_protocol,
- self.tun_if.remote_addr[addr_type],
self.tun_if.local_addr[addr_type],
+ self.tun_if.remote_addr[addr_type],
tun_flags=tun_flags,
flags=flags,
dscp=params.dscp,
@@ -208,7 +208,7 @@ class ConfigIpsecAH(TemplateIpsec):
e1 = VppIpsecSpdEntry(
self,
self.tun_spd,
- vpp_tun_sa_id,
+ scapy_tun_sa_id,
remote_tun_if_host,
remote_tun_if_host,
self.pg1.remote_addr[addr_type],
@@ -221,7 +221,7 @@ class ConfigIpsecAH(TemplateIpsec):
e2 = VppIpsecSpdEntry(
self,
self.tun_spd,
- scapy_tun_sa_id,
+ vpp_tun_sa_id,
self.pg1.remote_addr[addr_type],
self.pg1.remote_addr[addr_type],
remote_tun_if_host,
@@ -233,7 +233,7 @@ class ConfigIpsecAH(TemplateIpsec):
e3 = VppIpsecSpdEntry(
self,
self.tun_spd,
- vpp_tun_sa_id,
+ scapy_tun_sa_id,
remote_tun_if_host,
remote_tun_if_host,
self.pg0.local_addr[addr_type],
@@ -246,7 +246,7 @@ class ConfigIpsecAH(TemplateIpsec):
e4 = VppIpsecSpdEntry(
self,
self.tun_spd,
- scapy_tun_sa_id,
+ vpp_tun_sa_id,
self.pg0.local_addr[addr_type],
self.pg0.local_addr[addr_type],
remote_tun_if_host,
@@ -336,7 +336,7 @@ class ConfigIpsecAH(TemplateIpsec):
VppIpsecSpdEntry(
self,
self.tra_spd,
- vpp_tra_sa_id,
+ scapy_tra_sa_id,
self.tra_if.local_addr[addr_type],
self.tra_if.local_addr[addr_type],
self.tra_if.remote_addr[addr_type],
@@ -351,7 +351,7 @@ class ConfigIpsecAH(TemplateIpsec):
VppIpsecSpdEntry(
self,
self.tra_spd,
- scapy_tra_sa_id,
+ vpp_tra_sa_id,
self.tra_if.local_addr[addr_type],
self.tra_if.local_addr[addr_type],
self.tra_if.remote_addr[addr_type],