frr-reload: rpki context exiting uses exit and not end

Issue:
The rpki subcontext uses exit instead of end to exit.
This makes issues with frr-reload in the way that frr-reload never exits
rpki context until it reaches the next end statement. this also happens when
parsing the configuration from vtysh.

Fixes: #7887
Signed-off-by: Runar Borge <runar@borge.nu>
This commit is contained in:
Runar Borge 2021-01-23 00:15:41 +01:00 committed by Donald Sharp
parent d5b342eb75
commit 7cfb307943
1 changed files with 10 additions and 0 deletions

View File

@ -629,6 +629,16 @@ end
ctx_keys = []
current_context_lines = []
elif line == "exit" and ctx_keys[0].startswith("rpki"):
self.save_contexts(ctx_keys, current_context_lines)
log.debug("LINE %-50s: exiting old context, %-50s", line, ctx_keys)
# Start a new context
new_ctx = True
main_ctx_key = []
ctx_keys = []
current_context_lines = []
elif line == "exit-vrf":
self.save_contexts(ctx_keys, current_context_lines)
current_context_lines.append(line)