Merge pull request #4706 from qlyoung/fix-exit-vrf-markfile

vtysh: mark exit-vrf with end when using vtysh -m
This commit is contained in:
Sri Mohana Singamsetty 2019-08-13 08:40:21 -07:00 committed by GitHub
commit ce935bc284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -852,11 +852,15 @@ int vtysh_mark_file(const char *filename)
return CMD_ERR_INCOMPLETE;
case CMD_SUCCESS:
vty_out(vty, "%s", vty->buf);
if (strmatch(vty_buf_trimmed, "exit-vrf"))
vty_out(vty, "end\n");
break;
case CMD_SUCCESS_DAEMON: {
int cmd_stat;
vty_out(vty, "%s", vty->buf);
if (strmatch(vty_buf_trimmed, "exit-vrf"))
vty_out(vty, "end\n");
cmd_stat = vtysh_client_execute(&vtysh_client[0],
vty->buf);
if (cmd_stat != CMD_SUCCESS)