summaryrefslogtreecommitdiffstats
path: root/src/plugins/svs/svs_api.c
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2020-03-19 08:03:55 +0100
committerJakub Grajciar <jgrajcia@cisco.com>2020-03-19 12:49:55 +0100
commit7dd63e5cc1b48adc4f912778ba79d67c71f94b83 (patch)
tree8d923e3337cb7dc5666c135b4898ad6c5f7adced /src/plugins/svs/svs_api.c
parentf14578972a21fe10cd3ff72aaaaea43da4d74d20 (diff)
ip: change ip API enums address_family and ip_proto size to u8
Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I73d27520726543d6375caad76a841339f68c3533 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/plugins/svs/svs_api.c')
-rw-r--r--src/plugins/svs/svs_api.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/svs/svs_api.c b/src/plugins/svs/svs_api.c
index 654a074471d..628acd01b01 100644
--- a/src/plugins/svs/svs_api.c
+++ b/src/plugins/svs/svs_api.c
@@ -66,7 +66,9 @@ vl_api_svs_table_add_del_t_handler (vl_api_svs_table_add_del_t * mp)
fib_protocol_t fproto;
int rv = 0;
- fproto = fib_proto_from_api_address_family (mp->af);
+ rv = fib_proto_from_api_address_family (mp->af, &fproto);
+ if (rv < 0)
+ goto error;
if (mp->is_add)
{
@@ -77,6 +79,7 @@ vl_api_svs_table_add_del_t_handler (vl_api_svs_table_add_del_t * mp)
rv = svs_table_delete (fproto, ntohl (mp->table_id));
}
+error:
REPLY_MACRO (VL_API_SVS_TABLE_ADD_DEL_REPLY + svs_base_msg_id);
}
@@ -111,7 +114,9 @@ vl_api_svs_enable_disable_t_handler (vl_api_svs_enable_disable_t * mp)
VALIDATE_SW_IF_INDEX (mp);
- fproto = fib_proto_from_api_address_family (mp->af);
+ rv = fib_proto_from_api_address_family (mp->af, &fproto);
+ if (rv < 0)
+ goto error;
if (mp->is_enable)
{
@@ -124,6 +129,7 @@ vl_api_svs_enable_disable_t_handler (vl_api_svs_enable_disable_t * mp)
}
BAD_SW_IF_INDEX_LABEL;
+error:
REPLY_MACRO (VL_API_SVS_ENABLE_DISABLE_REPLY + svs_base_msg_id);
}