]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Consolidate VIEW_NODE to be ENABLE_NODE as well
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 11 Mar 2016 19:27:12 +0000 (14:27 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 8 Oct 2016 01:05:06 +0000 (21:05 -0400)
If you are in VIEW_NODE, the command should exist in ENABLE_NODE
as well.  This is being done to reduce chances of code being
added to one but not the other NODE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/command.c

index 5ebab1450da8f08f62b94c870913062f72503918..f72733ab2786bef72c69022f04c5866e29a03ce3 100644 (file)
@@ -718,6 +718,9 @@ install_element (enum node_type ntype, struct cmd_element *cmd)
   vector_set (cnode->cmd_vector, cmd);
   if (cmd->tokens == NULL)
     cmd->tokens = cmd_parse_format(cmd->string, cmd->doc);
+
+  if (ntype == VIEW_NODE)
+    install_element (ENABLE_NODE, cmd);
 }
 
 static const unsigned char itoa64[] =