diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-10-11 14:10:31 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-10-11 14:13:02 +0200 |
commit | 0fd0fe61fa1d20d3f8fbd04c70c60db63bcbe045 (patch) | |
tree | d2251deeccd8ae050ad159b99646beae0c14fac9 /src/vty/command.c | |
parent | ff42852d2244002f60f835b2d9658b1aff1f022b (diff) |
vty: Fix go_parent_cb not called for indented nodes at end of cfg file
Without this patch, for instance in this cfg file below, go_parent_cb is
not called for nodes such as "listen" and "cs7":
"""
line vty
no login
cs7 instance 0
xua rkm routing-key-allocation dynamic-permitted
listen m3ua 2905
accept-asp-connections dynamic-permitted
local-ip 127.0.0.1
"""
Related: OS#3608
Change-Id: Ia6d88c0e63d94ba99e950da6efbc4c1871070012
Diffstat (limited to 'src/vty/command.c')
-rw-r--r-- | src/vty/command.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vty/command.c b/src/vty/command.c index 0d24b667..a36f30a3 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -2662,6 +2662,10 @@ int config_from_file(struct vty *vty, FILE * fp) indent = NULL; } } + /* Make sure we call go_parent_cb for all remaining indent levels at the end of file */ + while (vty_parent(vty)) + vty_go_parent(vty); + return CMD_SUCCESS; return_invalid_indent: |