summaryrefslogtreecommitdiffstats
path: root/lib/command.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-09-28 20:10:40 -0400
committerPaul Jakma <paul@quagga.net>2015-10-27 10:53:21 +0000
commitd8aa4beab72cdd2c2d78f9e624fd4b704eec488f (patch)
treeb2f1db2c50ce548175240b9621df6df936cf44a6 /lib/command.h
parent7125293d65d73a451ec203c8c1630c236171f5a3 (diff)
downloadquagga-d8aa4beab72cdd2c2d78f9e624fd4b704eec488f.tar.bz2
quagga-d8aa4beab72cdd2c2d78f9e624fd4b704eec488f.tar.xz
vtysh: Fix Quagga.conf file read in.
There exists a sequence of cli commands that are successfully read in by bgpd.conf, but not by a consolidated Quagga.conf. This issue stems from the fact that the consolidated config file attempts to match the current node + 1 node up the tree, while the individual config file searches for matches all the way up the tree. Quagga.conf read-in relies on vtysh_cmd.c command parsing which puts all nodes at CONFIG_NODE and if a match is found CMD_SUCCESS_DAEMON is returned. This signals to the parser to call the appropriate daemon with the comamnd. bgp as an example has three levels of config node's. If you are reading in a config node at the 3rd level(say address-family ipv6) then transition to another node under bgp it will not work in Quagga.conf because the code only looked up one node and was at CONFIG_BGP when it failed to find a match. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/command.h b/lib/command.h
index bb0122fa..6030069a 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -527,6 +527,7 @@ extern void cmd_free_strvec (vector);
extern vector cmd_describe_command (vector, struct vty *, int *status);
extern char **cmd_complete_command (vector, struct vty *, int *status);
extern const char *cmd_prompt (enum node_type);
+extern int command_config_read_one_line (struct vty *vty, struct cmd_element **, int use_config_node);
extern int config_from_file (struct vty *, FILE *, unsigned int *line_num);
extern enum node_type node_parent (enum node_type);
extern int cmd_execute_command (vector, struct vty *, struct cmd_element **, int);