summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-04-15 15:15:21 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-04-15 21:13:13 +0200
commit279c6956d90fd4ba8aa0ff60b9a0484b9933f827 (patch)
treedb9c4f93c7ac9533fb1e3f439e2f851cd12d68a6 /vtysh
parentquagga: Check for existence of IFLA_INFO_SLAVE_KIND (diff)
downloadfrr-279c6956d90fd4ba8aa0ff60b9a0484b9933f827.tar.xz
frr-279c6956d90fd4ba8aa0ff60b9a0484b9933f827.zip
vtysh: Allow file read in to continue in more cases
When a duplicate command is read in from a file, there are cases where daemons return CMD_WARNING this causes the command to not be send to subsuquent daemons( if any ). Allow the read in of commands to continue in this situation. Ticket: CM-10393 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index f7f38049e..44d67e8f9 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -723,7 +723,15 @@ vtysh_config_from_file (struct vty *vty, FILE *fp)
{
cmd_stat = vtysh_client_execute (&vtysh_client[i],
vty->buf, stdout);
- if (cmd_stat != CMD_SUCCESS)
+ /*
+ * CMD_WARNING - Can mean that the command was
+ * parsed successfully but it was already entered
+ * in a few spots. As such if we receive a
+ * CMD_WARNING from a daemon we shouldn't stop
+ * talking to the other daemons for the particular
+ * command.
+ */
+ if (cmd_stat != CMD_SUCCESS && cmd_stat != CMD_WARNING)
{
fprintf (stderr, "line %d: Failure to communicate[%d] to %s, line: %s\n",
lineno, cmd_stat, vtysh_client[i].name, vty->buf);