summaryrefslogtreecommitdiffstats
path: root/lib/mgmt_fe_client.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2024-01-24 21:17:13 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2024-01-27 19:01:19 +0100
commit0d5a2497ca56d98e9af9d337a9b9d208e8b3bfcb (patch)
tree6d8b7ec96b463d5a865ec3c9f6c8fdfc2ce55428 /lib/mgmt_fe_client.c
parent*: rename `frr_vtydir` to `frr_runstatedir` (diff)
downloadfrr-0d5a2497ca56d98e9af9d337a9b9d208e8b3bfcb.tar.xz
frr-0d5a2497ca56d98e9af9d337a9b9d208e8b3bfcb.zip
lib, mgmtd: fix wrong mgmtd socket paths
These paths were ignoring the `-N` namespacing option. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/mgmt_fe_client.c')
-rw-r--r--lib/mgmt_fe_client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/mgmt_fe_client.c b/lib/mgmt_fe_client.c
index 57ac071ec..92619f4f7 100644
--- a/lib/mgmt_fe_client.c
+++ b/lib/mgmt_fe_client.c
@@ -712,6 +712,7 @@ struct mgmt_fe_client *mgmt_fe_client_create(const char *client_name,
struct event_loop *event_loop)
{
struct mgmt_fe_client *client;
+ char server_path[MAXPATHLEN];
if (__fe_client)
return NULL;
@@ -726,7 +727,9 @@ struct mgmt_fe_client *mgmt_fe_client_create(const char *client_name,
mgmt_sessions_init(&client->sessions);
- msg_client_init(&client->client, event_loop, MGMTD_FE_SERVER_PATH,
+ snprintf(server_path, sizeof(server_path), MGMTD_FE_SOCK_NAME);
+
+ msg_client_init(&client->client, event_loop, server_path,
mgmt_fe_client_notify_connect,
mgmt_fe_client_notify_disconnect,
mgmt_fe_client_process_msg, MGMTD_FE_MAX_NUM_MSG_PROC,