vtysh: fix show daemons did't show ospfd proto daemons

Signed-off-by: alexan <1579628578@qq.com>
This commit is contained in:
alexan 2025-04-02 09:34:21 +08:00
parent b06dd2ccac
commit 932c2fd965

View file

@ -4244,10 +4244,24 @@ DEFUN (vtysh_show_daemons,
"Show list of running daemons\n")
{
unsigned int i;
struct vtysh_client *client;
for (i = 0; i < array_size(vtysh_client); i++) {
if (vtysh_client[i].flag == VTYSH_OSPFD) {
client = &vtysh_client[i];
while (client) {
if (client->fd >= 0) {
vty_out(vty, " %s", client->name);
break;
}
client = client->next;
}
}
for (i = 0; i < array_size(vtysh_client); i++)
if (vtysh_client[i].fd >= 0)
vty_out(vty, " %s", vtysh_client[i].name);
}
vty_out(vty, "\n");
return CMD_SUCCESS;