summaryrefslogtreecommitdiffstats
path: root/test/test_ipsec_esp.py
diff options
context:
space:
mode:
authorPiotr Bronowski <piotrx.bronowski@intel.com>2022-06-09 09:09:28 +0000
committerFan Zhang <roy.fan.zhang@intel.com>2022-06-28 14:53:07 +0000
commit815c6a4fbcbb636ce3b4dc98446ad205a30670a6 (patch)
tree36e3b6aec51cdd5603dce1c9dd701da869c11c39 /test/test_ipsec_esp.py
parent5b4b4c05ff06b866b90b0df9b2be2ed28e606f16 (diff)
ipsec: change wildcard value for any protocol of spd policy
Currently 0 has been used as the wildcard representing ANY type of protocol. However 0 is valid value of ip protocol (HOPOPT) and therefore it should not be used as a wildcard. Instead 255 is used which is guaranteed by IANA to be reserved and not used as a protocol id. Type: improvement Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com> Change-Id: I2320bae6fe380cb999dc5a9187beb68fda2d31eb
Diffstat (limited to 'test/test_ipsec_esp.py')
-rw-r--r--test/test_ipsec_esp.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/test_ipsec_esp.py b/test/test_ipsec_esp.py
index 54b877112e9..90f013f8010 100644
--- a/test/test_ipsec_esp.py
+++ b/test/test_ipsec_esp.py
@@ -206,7 +206,7 @@ class ConfigIpsecESP(TemplateIpsec):
remote_tun_if_host,
self.pg1.remote_addr[addr_type],
self.pg1.remote_addr[addr_type],
- 0,
+ socket.IPPROTO_RAW,
priority=10,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
is_outbound=0,
@@ -221,7 +221,7 @@ class ConfigIpsecESP(TemplateIpsec):
self.pg1.remote_addr[addr_type],
remote_tun_if_host,
remote_tun_if_host,
- 0,
+ socket.IPPROTO_RAW,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
priority=10,
)
@@ -235,7 +235,7 @@ class ConfigIpsecESP(TemplateIpsec):
remote_tun_if_host,
self.pg0.local_addr[addr_type],
self.pg0.local_addr[addr_type],
- 0,
+ socket.IPPROTO_RAW,
priority=20,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
is_outbound=0,
@@ -250,7 +250,7 @@ class ConfigIpsecESP(TemplateIpsec):
self.pg0.local_addr[addr_type],
remote_tun_if_host,
remote_tun_if_host,
- 0,
+ socket.IPPROTO_RAW,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
priority=20,
)
@@ -337,7 +337,7 @@ class ConfigIpsecESP(TemplateIpsec):
self.tra_if.local_addr[addr_type],
self.tra_if.remote_addr[addr_type],
self.tra_if.remote_addr[addr_type],
- 0,
+ socket.IPPROTO_RAW,
priority=10,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
is_outbound=0,
@@ -352,7 +352,7 @@ class ConfigIpsecESP(TemplateIpsec):
self.tra_if.local_addr[addr_type],
self.tra_if.remote_addr[addr_type],
self.tra_if.remote_addr[addr_type],
- 0,
+ socket.IPPROTO_RAW,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
priority=10,
)
@@ -452,7 +452,7 @@ class TestIpsecEsp1(
self.pg1.remote_addr[p4.addr_type],
p6.remote_tun_if_host4,
p6.remote_tun_if_host4,
- 0,
+ socket.IPPROTO_RAW,
priority=10,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
is_outbound=1,
@@ -487,7 +487,7 @@ class TestIpsecEsp1(
self.pg1.remote_addr[p6.addr_type],
p4.remote_tun_if_host6,
p4.remote_tun_if_host6,
- 0,
+ socket.IPPROTO_RAW,
priority=10,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
is_outbound=1,
@@ -648,7 +648,7 @@ class TestIpsecEspAsync(TemplateIpsecEsp):
self.pg1.remote_addr[self.p_sync.addr_type],
self.p_sync.remote_tun_if_host,
self.p_sync.remote_tun_if_host,
- 0,
+ socket.IPPROTO_RAW,
priority=1,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
is_outbound=1,
@@ -707,7 +707,7 @@ class TestIpsecEspAsync(TemplateIpsecEsp):
self.pg1.remote_addr[self.p_async.addr_type],
self.p_async.remote_tun_if_host,
self.p_async.remote_tun_if_host,
- 0,
+ socket.IPPROTO_RAW,
priority=2,
policy=e.IPSEC_API_SPD_ACTION_PROTECT,
is_outbound=1,