aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-03-08 09:37:43 +0100
committerFlorin Coras <florin.coras@gmail.com>2021-03-08 15:26:29 +0000
commitb0c2ec5e7c84241e0f5beb5fdf8a60cf111d5ffb (patch)
tree6f45ec035b850081b22d3aaaf24b1175b54f984a /src
parent7a588fc7819153fe32e7d12733da4ecd2e663437 (diff)
cnat: Coverity fix
Type: fix Change-Id: I004a49e59d8643599fc99ad6fa5848d3cf289b7a Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/cnat/cnat_snat_policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cnat/cnat_snat_policy.c b/src/plugins/cnat/cnat_snat_policy.c
index e2901631b28..d59156f34c8 100644
--- a/src/plugins/cnat/cnat_snat_policy.c
+++ b/src/plugins/cnat/cnat_snat_policy.c
@@ -91,7 +91,7 @@ cnat_snat_policy_add_del_if (u32 sw_if_index, u8 is_add,
{
cnat_snat_policy_main_t *cpm = &cnat_snat_policy_main;
- if (table > ARRAY_LEN (cpm->interface_maps))
+ if (table >= ARRAY_LEN (cpm->interface_maps))
return VNET_API_ERROR_INVALID_VALUE;
clib_bitmap_t **map = &cpm->interface_maps[table];