Skip to content

Commit

Permalink
Merge pull request #4706 from qlyoung/fix-exit-vrf-markfile
Browse files Browse the repository at this point in the history
vtysh: mark exit-vrf with end when using vtysh -m
  • Loading branch information
srimohans committed Aug 13, 2019
2 parents 3e31782 + 13f48fd commit ce935bc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vtysh/vtysh.c
Expand Up @@ -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)
Expand Down

0 comments on commit ce935bc

Please sign in to comment.