summaryrefslogtreecommitdiffstats
path: root/src/plugins/lacp/lacp_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lacp/lacp_test.c')
-rw-r--r--src/plugins/lacp/lacp_test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/lacp/lacp_test.c b/src/plugins/lacp/lacp_test.c
index 0a8631d4df1..4e28a6d80bd 100644
--- a/src/plugins/lacp/lacp_test.c
+++ b/src/plugins/lacp/lacp_test.c
@@ -206,6 +206,10 @@ vat_plugin_register (vat_main_t * vam)
/* Ask the vpp engine for the first assigned message-id */
name = format (0, "lacp_%08x%c", api_version, 0);
lm->msg_id_base = vl_client_get_first_plugin_msg_id ((char *) name);
+ vec_free (name);
+
+ if (lm->msg_id_base == (u16) ~ 0)
+ return clib_error_return (0, "lacp plugin not loaded...");
/* Get the control ping ID */
#define _(id,n,crc) \
@@ -217,8 +221,6 @@ vat_plugin_register (vat_main_t * vam)
if (lm->msg_id_base != (u16) ~ 0)
lacp_vat_api_hookup (vam);
- vec_free (name);
-
return 0;
}