aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-01-23 08:16:17 -0800
committerDamjan Marion <dmarion@me.com>2019-01-24 19:51:37 +0000
commit8e4a89bf42196308601de7544abe554df7b0df45 (patch)
tree622d478674fa634efae76a926f7f87bbaeb6bd35 /src/vnet
parente18b45caeb22b5dfe38b86be6beea55efaecf40d (diff)
IPSEC Tests: to per-test setup and tearDown
don't do the setup and teardown in class methods so that with each test the config is added and deleted. that way we test that delete actually removes state. more helpful error codes from VPP for existing IPSEC state. Change-Id: I5de1578f73b935b420d4cdd85aa98d5fdcc682f6 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ipsec/ipsec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/ipsec/ipsec.c b/src/vnet/ipsec/ipsec.c
index fdd18c2f8fa..86de522e3d7 100644
--- a/src/vnet/ipsec/ipsec.c
+++ b/src/vnet/ipsec/ipsec.c
@@ -99,9 +99,9 @@ ipsec_add_del_spd (vlib_main_t * vm, u32 spd_id, int is_add)
p = hash_get (im->spd_index_by_spd_id, spd_id);
if (p && is_add)
- return VNET_API_ERROR_INVALID_VALUE;
+ return VNET_API_ERROR_ENTRY_ALREADY_EXISTS;
if (!p && !is_add)
- return VNET_API_ERROR_INVALID_VALUE;
+ return VNET_API_ERROR_NO_SUCH_ENTRY;
if (!is_add) /* delete */
{
@@ -441,9 +441,9 @@ ipsec_add_del_sa (vlib_main_t * vm, ipsec_sa_t * new_sa, int is_add)
p = hash_get (im->sa_index_by_sa_id, new_sa->id);
if (p && is_add)
- return VNET_API_ERROR_SYSCALL_ERROR_1; /* already exists */
+ return VNET_API_ERROR_ENTRY_ALREADY_EXISTS;
if (!p && !is_add)
- return VNET_API_ERROR_SYSCALL_ERROR_1;
+ return VNET_API_ERROR_NO_SUCH_ENTRY;
if (!is_add) /* delete */
{