summaryrefslogtreecommitdiff
path: root/lib/command_graph.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2017-08-07 10:33:15 -0400
committerGitHub <noreply@github.com>2017-08-07 10:33:15 -0400
commitf36f135e73dae4b2c2c768e246fd19c32c57c631 (patch)
treec291c0c7f981b81c25a6374c99445e8ce66cb747 /lib/command_graph.c
parenta1ea626ef9da354c4e8ab77a63b30142fdad6089 (diff)
parent5225e155d38c58e5dc1f48f9b183142f6745f90c (diff)
Merge pull request #921 from opensourcerouting/vty-varname-end-tkn
lib: cli: don't run off graph "pre-end"
Diffstat (limited to 'lib/command_graph.c')
-rw-r--r--lib/command_graph.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/command_graph.c b/lib/command_graph.c
index 3efa4d5cfc..dc7233c1fe 100644
--- a/lib/command_graph.c
+++ b/lib/command_graph.c
@@ -385,7 +385,6 @@ static void cmd_node_names(struct graph_node *gn, struct graph_node *join,
break;
case START_TKN:
- case END_TKN:
case JOIN_TKN:
/* "<foo|bar> WORD" -> word is not "bar" or "foo" */
prevname = NULL;
@@ -405,6 +404,9 @@ static void cmd_node_names(struct graph_node *gn, struct graph_node *join,
cmd_token_varname_set(tailtok, jointok->varname);
}
break;
+
+ case END_TKN:
+ return;
}
for (i = 0; i < vector_active(gn->to); i++) {