aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2020-09-02 10:33:25 -0400
committerDamjan Marion <dmarion@me.com>2020-09-03 22:53:34 +0000
commit4a433f46084d05a524154db64d3d7d2567305009 (patch)
tree7947ba3c8e5a0812c4684b130f211ffb256cd3e5
parent4d56b18ce595a43ff5de1d168d66eab98560e7a7 (diff)
api: fix ipsec custom_dump function
The protocol value was changed to 50 and 51 (rather than 0 and 1), but the custom_dump function wasn't updated to reflect this. Also the is_add value wasn't being shown. Fix both these issues. Type: fix Change-Id: I429b4616d6c7937f73308b644154370fab32eaae Signed-off-by: Christian Hopps <chopps@labn.net>
-rw-r--r--src/vpp/api/custom_dump.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/vpp/api/custom_dump.c b/src/vpp/api/custom_dump.c
index 8c5e0e52e54..5f022952cfa 100644
--- a/src/vpp/api/custom_dump.c
+++ b/src/vpp/api/custom_dump.c
@@ -3092,11 +3092,6 @@ static const char *policy_strs[] = {
"PROTECT",
};
-static const char *proto_strs[] = {
- "ESP",
- "AH",
-};
-
static const char *algo_strs[] = {
"NONE",
"AES_CBC_128",
@@ -3202,11 +3197,13 @@ static void *vl_api_ipsec_sad_entry_add_del_t_print
ep = (vl_api_ipsec_sad_entry_t *) & mp->entry;
- s = format (0, "SCRIPT: ipsec_sad_entry_add_del is_add ", mp->is_add);
+ s = format (0, "SCRIPT: ipsec_sad_entry_add_del is_add %d ", mp->is_add);
tmp = (ep->protocol);
- if (tmp < ARRAY_LEN (proto_strs))
- protocol_str = proto_strs[tmp];
+ if (tmp == IPSEC_API_PROTO_ESP)
+ protocol_str = "ESP";
+ else if (tmp == IPSEC_API_PROTO_AH)
+ protocol_str = "AH";
tmp = (ep->crypto_algorithm);
if (tmp < ARRAY_LEN (algo_strs))