diff options
author | Christian Hopps <chopps@labn.net> | 2023-11-11 19:21:17 +0100 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2023-11-11 19:25:03 +0100 |
commit | 59beac5013f48889d8b73bb57df085d8d3e7a09f (patch) | |
tree | 799ce3a01f6417db5d7538e615a5e72fd3761185 /vtysh | |
parent | Merge pull request #14758 from LabNConsulting/fix-mgmtd-coverity (diff) | |
download | frr-59beac5013f48889d8b73bb57df085d8d3e7a09f.tar.xz frr-59beac5013f48889d8b73bb57df085d8d3e7a09f.zip |
lib: mgmtd: fix debug cli commands and memleaks
- Cannot have 2 cmd_node's with same .node number. Install the mgmtd
client library debug nodes (client frontend and client backend) using
new unique node numbers. Fixes memleaks.
- Fix "debug mgmt client backend" to generate correct config (and not
for frontend).
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh_config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vtysh/vtysh_config.c b/vtysh/vtysh_config.c index ae64d5128..c02f27c87 100644 --- a/vtysh/vtysh_config.c +++ b/vtysh/vtysh_config.c @@ -455,6 +455,12 @@ void vtysh_config_parse_line(void *arg, const char *line) else if (strncmp(line, "debug resolver", strlen("debug resolver")) == 0) config = config_get(RESOLVER_DEBUG_NODE, line); + else if (strncmp(line, "debug mgmt client frontend", + strlen("debug mgmt client frontend")) == 0) + config = config_get(MGMT_FE_DEBUG_NODE, line); + else if (strncmp(line, "debug mgmt client backend", + strlen("debug mgmt client backend")) == 0) + config = config_get(MGMT_BE_DEBUG_NODE, line); else if (strncmp(line, "debug", strlen("debug")) == 0) config = config_get(DEBUG_NODE, line); else if (strncmp(line, "password", strlen("password")) == 0 |