summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2015-10-16 22:51:38 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2015-10-16 22:51:38 +0200
commitfd715b78d97fc64e025a81365051c2483b5a3425 (patch)
tree67662eb05b7ab459e5e8b6597697f9088d2e2a86
parentbgpd: fix using of two pointers for struct thread_master * (diff)
downloadfrr-fd715b78d97fc64e025a81365051c2483b5a3425.tar.xz
frr-fd715b78d97fc64e025a81365051c2483b5a3425.zip
quagga errors parsing a valid config
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--lib/command.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/command.c b/lib/command.c
index f6cb9dc8f..5e8259dd3 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -2805,26 +2805,30 @@ command_config_read_one_line (struct vty *vty, struct cmd_element **cmd, int use
// Climb the tree and try the command again at each node
if (!(use_daemon && ret == CMD_SUCCESS_DAEMON) &&
- ret != CMD_SUCCESS && ret != CMD_WARNING &&
- ret != CMD_ERR_NOTHING_TODO && vty->node != CONFIG_NODE) {
+ !(!use_daemon && ret == CMD_ERR_NOTHING_TODO) &&
+ ret != CMD_SUCCESS &&
+ ret != CMD_WARNING &&
+ vty->node != CONFIG_NODE) {
saved_node = vty->node;
while (!(use_daemon && ret == CMD_SUCCESS_DAEMON) &&
- ret != CMD_SUCCESS && ret != CMD_WARNING &&
- ret != CMD_ERR_NOTHING_TODO && vty->node != CONFIG_NODE) {
+ !(!use_daemon && ret == CMD_ERR_NOTHING_TODO) &&
+ ret != CMD_SUCCESS &&
+ ret != CMD_WARNING &&
+ vty->node != CONFIG_NODE) {
vty->node = node_parent(vty->node);
- ret = cmd_execute_command_strict (vline, vty, NULL);
+ ret = cmd_execute_command_strict (vline, vty, cmd);
}
// If climbing the tree did not work then ignore the command and
// stay at the same node
if (!(use_daemon && ret == CMD_SUCCESS_DAEMON) &&
- ret != CMD_SUCCESS && ret != CMD_WARNING &&
- ret != CMD_ERR_NOTHING_TODO)
+ !(!use_daemon && ret == CMD_ERR_NOTHING_TODO) &&
+ ret != CMD_SUCCESS &&
+ ret != CMD_WARNING)
{
vty->node = saved_node;
-
memcpy(vty->error_buf, vty->buf, VTY_BUFSIZ);
}
}