diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2024-01-24 21:17:13 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2024-01-27 19:01:19 +0100 |
commit | 0d5a2497ca56d98e9af9d337a9b9d208e8b3bfcb (patch) | |
tree | 6d8b7ec96b463d5a865ec3c9f6c8fdfc2ce55428 /mgmtd | |
parent | *: rename `frr_vtydir` to `frr_runstatedir` (diff) | |
download | frr-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 'mgmtd')
-rw-r--r-- | mgmtd/mgmt_be_adapter.c | 9 | ||||
-rw-r--r-- | mgmtd/mgmt_fe_adapter.c | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c index f92d6d8d5..e2b0e47ba 100644 --- a/mgmtd/mgmt_be_adapter.c +++ b/mgmtd/mgmt_be_adapter.c @@ -706,15 +706,18 @@ extern void mgmt_be_adapter_unlock(struct mgmt_be_client_adapter **adapter) */ void mgmt_be_adapter_init(struct event_loop *tm) { + char server_path[MAXPATHLEN]; + assert(!mgmt_loop); mgmt_loop = tm; mgmt_be_adapters_init(&mgmt_be_adapters); mgmt_be_xpath_map_init(); - if (msg_server_init(&mgmt_be_server, MGMTD_BE_SERVER_PATH, tm, - mgmt_be_create_adapter, "backend", - &mgmt_debug_be)) { + snprintf(server_path, sizeof(server_path), MGMTD_BE_SOCK_NAME); + + if (msg_server_init(&mgmt_be_server, server_path, tm, + mgmt_be_create_adapter, "backend", &mgmt_debug_be)) { zlog_err("cannot initialize backend server"); exit(1); } diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c index ff85f56e3..a99d92d2b 100644 --- a/mgmtd/mgmt_fe_adapter.c +++ b/mgmtd/mgmt_fe_adapter.c @@ -1309,6 +1309,8 @@ extern void mgmt_fe_adapter_unlock(struct mgmt_fe_client_adapter **adapter) */ void mgmt_fe_adapter_init(struct event_loop *tm) { + char server_path[MAXPATHLEN]; + assert(!mgmt_loop); mgmt_loop = tm; @@ -1319,9 +1321,10 @@ void mgmt_fe_adapter_init(struct event_loop *tm) hash_create(mgmt_fe_session_hash_key, mgmt_fe_session_hash_cmp, "MGMT Frontend Sessions"); - if (msg_server_init(&mgmt_fe_server, MGMTD_FE_SERVER_PATH, tm, - mgmt_fe_create_adapter, "frontend", - &mgmt_debug_fe)) { + snprintf(server_path, sizeof(server_path), MGMTD_FE_SOCK_NAME); + + if (msg_server_init(&mgmt_fe_server, server_path, tm, + mgmt_fe_create_adapter, "frontend", &mgmt_debug_fe)) { zlog_err("cannot initialize frontend server"); exit(1); } |