diff options
author | Piotr Bronowski <piotrx.bronowski@intel.com> | 2022-06-09 09:09:28 +0000 |
---|---|---|
committer | Fan Zhang <roy.fan.zhang@intel.com> | 2022-06-28 14:53:07 +0000 |
commit | 815c6a4fbcbb636ce3b4dc98446ad205a30670a6 (patch) | |
tree | 36e3b6aec51cdd5603dce1c9dd701da869c11c39 /src/vnet/ipsec/ipsec_format.c | |
parent | 5b4b4c05ff06b866b90b0df9b2be2ed28e606f16 (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 'src/vnet/ipsec/ipsec_format.c')
-rw-r--r-- | src/vnet/ipsec/ipsec_format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/ipsec/ipsec_format.c b/src/vnet/ipsec/ipsec_format.c index c8c0170efe7..24c9bee2878 100644 --- a/src/vnet/ipsec/ipsec_format.c +++ b/src/vnet/ipsec/ipsec_format.c @@ -168,7 +168,7 @@ format_ipsec_policy (u8 * s, va_list * args) pi, p->priority, format_ipsec_policy_action, p->policy, format_ipsec_policy_type, p->type); - if (p->protocol) + if (p->protocol != IPSEC_POLICY_PROTOCOL_ANY) { s = format (s, "%U", format_ip_protocol, p->protocol); } |