]> git.puffer.fish Git - mirror/frr.git/commitdiff
frr-reload: rpki context exiting uses exit and not end
authorRunar Borge <runar@borge.nu>
Fri, 22 Jan 2021 23:15:41 +0000 (00:15 +0100)
committerIgor Ryzhov <iryzhov@nfware.com>
Fri, 26 Feb 2021 11:37:08 +0000 (14:37 +0300)
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>
tools/frr-reload.py

index ca6fe81f007f074245e09f8931ecea35cd8d4410..88a40d89e1a38e8adc85254542994f1edea66be1 100755 (executable)
@@ -573,6 +573,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)