aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/linux-cp/lcp_api.c
diff options
context:
space:
mode:
authorStanislav Zaikin <zstaseg@gmail.com>2022-07-13 20:29:15 +0200
committerMatthew Smith <mgsmith@netgate.com>2023-03-21 14:56:23 +0000
commit653ef7355c05145485f49ce7e34eea043d389bba (patch)
tree90c57dcf3b4a689941d53339ee0fcaafd514335a /src/plugins/linux-cp/lcp_api.c
parent86698fca30941772a3b77106fc2b2e83a40bcfeb (diff)
linux-cp: fix get_default_ns api method
Type: fix Change-Id: I141e5779aab7eee3068b702dd2f93765420fb920 Signed-off-by: Stanislav Zaikin <stanislav.zaikin@46labs.com>
Diffstat (limited to 'src/plugins/linux-cp/lcp_api.c')
-rw-r--r--src/plugins/linux-cp/lcp_api.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/plugins/linux-cp/lcp_api.c b/src/plugins/linux-cp/lcp_api.c
index 638d9f796d1..a217aa708f3 100644
--- a/src/plugins/linux-cp/lcp_api.c
+++ b/src/plugins/linux-cp/lcp_api.c
@@ -177,19 +177,13 @@ static void
vl_api_lcp_default_ns_get_t_handler (vl_api_lcp_default_ns_get_t *mp)
{
vl_api_lcp_default_ns_get_reply_t *rmp;
- vl_api_registration_t *reg;
- char *ns;
-
- reg = vl_api_client_index_to_registration (mp->client_index);
- if (!reg)
- return;
-
- REPLY_MACRO_DETAILS2_END (VL_API_LCP_DEFAULT_NS_GET_REPLY, ({
- ns = (char *) lcp_get_default_ns ();
- if (ns)
- clib_strncpy ((char *) rmp->netns, ns,
- LCP_NS_LEN - 1);
- }));
+
+ REPLY_MACRO_DETAILS2 (VL_API_LCP_DEFAULT_NS_GET_REPLY, ({
+ char *ns = (char *) lcp_get_default_ns ();
+ if (ns)
+ clib_strncpy ((char *) rmp->netns, ns,
+ LCP_NS_LEN - 1);
+ }));
}
static void