mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-21 17:51:17 +00:00
vtysh: handle case if there is no match in "write terminal $daemon"
While the DEFUN should match the list of clients registered in vtysh, it seems better to handle the case explicitly instead of relying on the client list and the DEFUN signature being in sync. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
58093a7917
commit
ce01a2ca3f
@ -2409,6 +2409,9 @@ DEFUN (vtysh_write_terminal_daemon,
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == array_size(vtysh_client))
|
||||
return CMD_ERR_NO_MATCH;
|
||||
|
||||
ret = vtysh_client_execute(&vtysh_client[i], "show running-config\n", stdout);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user