summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-06-14 19:47:14 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-09-19 11:22:35 -0400
commitfa984909bac5e2689811bdaddbe6a770d19ef628 (patch)
tree8b40c67ab82f7a9bc0d07a334df7a3727ee7b6e5 /lib/command.c
parent2d67d5a2b57ae19a526e267258c71649e5e86d29 (diff)
lib: allow 'do' commands in ENABLE_NODE
'do' is syntax sugar that allows the user to execute a command under ENABLE_NODE when in another CLI node. If the user is already in ENABLE_NODE, use of 'do' was previously disallowed. This patch allows it because it makes it easier for us to hack around certain instances of the node synchronization problem with vtysh. Also included is a fix for one of these problems. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c
index 444305d5d5..cd4008d7cc 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -758,8 +758,7 @@ static struct graph *cmd_node_graph(vector v, enum node_type ntype)
static int cmd_try_do_shortcut(enum node_type node, char *first_word)
{
if (first_word != NULL && node != AUTH_NODE && node != VIEW_NODE
- && node != AUTH_ENABLE_NODE && node != ENABLE_NODE
- && 0 == strcmp("do", first_word))
+ && node != AUTH_ENABLE_NODE && 0 == strcmp("do", first_word))
return 1;
return 0;
}