diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-07-27 00:37:49 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-07-27 00:44:49 +0200 |
commit | a701f7eaa27a6a816170997439a96f43082c9833 (patch) | |
tree | 5f0aabd1be4743338cd4307695232882a5ce505f /vtysh | |
parent | ldpd: add the exit-address-family command (diff) | |
download | frr-a701f7eaa27a6a816170997439a96f43082c9833.tar.xz frr-a701f7eaa27a6a816170997439a96f43082c9833.zip |
vtysh: fix markfile output for ldpd
Put the "end" marker in the right places. This should fix the
frr-reload.py script because it depends on the output of vtysh -m.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/vtysh.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 395982189..adf47ed57 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -498,6 +498,29 @@ int vtysh_mark_file(const char *filename) strcpy(vty_buf_copy, vty->buf); vty_buf_trimmed = trim(vty_buf_copy); + switch (vty->node) { + case LDP_IPV4_IFACE_NODE: + if (strncmp(vty_buf_copy, " ", 3)) { + fprintf(stdout, " end\n"); + vty->node = LDP_IPV4_NODE; + } + break; + case LDP_IPV6_IFACE_NODE: + if (strncmp(vty_buf_copy, " ", 3)) { + fprintf(stdout, " end\n"); + vty->node = LDP_IPV6_NODE; + } + break; + case LDP_PSEUDOWIRE_NODE: + if (strncmp(vty_buf_copy, " ", 2)) { + fprintf(stdout, " end\n"); + vty->node = LDP_L2VPN_NODE; + } + break; + default: + break; + } + if (vty_buf_trimmed[0] == '!' || vty_buf_trimmed[0] == '#') { fprintf(stdout, "%s", vty->buf); continue; |