mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 15:43:55 +00:00
vtysh: stop reading config file if user exit
s from root level.
This is required to make sure that we properly send the
XFRR_end_configuration tag to the daemons. Previously if the user had an
`exit` at the root level the parser would just drop out of the config
node and so XFRR_end_configuration, even if sent, would be ignored
Signed-off-by: Christian Hopps <chopps@labn.net>
(cherry picked from commit 315e9032e4
)
This commit is contained in:
parent
edf01373b8
commit
cfca317c59
@ -880,6 +880,13 @@ int vtysh_config_from_file(struct vty *vty, FILE *fp)
|
||||
if (strmatch(vty_buf_trimmed, "end"))
|
||||
continue;
|
||||
|
||||
if (strmatch(vty_buf_trimmed, "exit") &&
|
||||
vty->node == CONFIG_NODE) {
|
||||
fprintf(stderr, "line %d: Warning[%d]...: %s\n", lineno,
|
||||
vty->node, "early exit from config file");
|
||||
break;
|
||||
}
|
||||
|
||||
ret = command_config_read_one_line(vty, &cmd, lineno, 1);
|
||||
|
||||
switch (ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user