summaryrefslogtreecommitdiff
path: root/lib/mgmt_be_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_be_client.c
parent42eeea090e0e07de78763e3111e92f510d89c44c (diff)
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_be_client.c')
-rw-r--r--lib/mgmt_be_client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/mgmt_be_client.c b/lib/mgmt_be_client.c
index d50dd03fdc..458623844a 100644
--- a/lib/mgmt_be_client.c
+++ b/lib/mgmt_be_client.c
@@ -1055,6 +1055,7 @@ struct mgmt_be_client *mgmt_be_client_create(const char *client_name,
struct event_loop *event_loop)
{
struct mgmt_be_client *client;
+ char server_path[MAXPATHLEN];
if (__be_client)
return NULL;
@@ -1071,7 +1072,10 @@ struct mgmt_be_client *mgmt_be_client_create(const char *client_name,
if (cbs)
client->cbs = *cbs;
mgmt_be_txns_init(&client->txn_head);
- msg_client_init(&client->client, event_loop, MGMTD_BE_SERVER_PATH,
+
+ snprintf(server_path, sizeof(server_path), MGMTD_BE_SOCK_NAME);
+
+ msg_client_init(&client->client, event_loop, server_path,
mgmt_be_client_notify_conenct,
mgmt_be_client_notify_disconenct,
mgmt_be_client_process_msg, MGMTD_BE_MAX_NUM_MSG_PROC,