summaryrefslogtreecommitdiffstats
path: root/pathd/path_nb.h
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-08-08 21:38:50 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-08-23 21:08:20 +0200
commit07679ad98ab97a4b783f7ae54f88d4d70a5729de (patch)
treee2a670c3a68fb5b856cd52426c2f0b972a414bcb /pathd/path_nb.h
parentpathd: rework config printing code (diff)
downloadfrr-07679ad98ab97a4b783f7ae54f88d4d70a5729de.tar.xz
frr-07679ad98ab97a4b783f7ae54f88d4d70a5729de.zip
*: explicitly print "exit" at the end of every node config
There is a possibility that the same line can be matched as a command in some node and its parent node. In this case, when reading the config, this line is always executed as a command of the child node. For example, with the following config: ``` router ospf network 193.168.0.0/16 area 0 ! mpls ldp discovery hello interval 111 ! ``` Line `mpls ldp` is processed as command `mpls ldp-sync` inside the `router ospf` node. This leads to a complete loss of `mpls ldp` node configuration. To eliminate this issue and all possible similar issues, let's print an explicit "exit" at the end of every node config. This commit also changes indentation for a couple of existing exit commands so that all existing commands are on the same level as their corresponding node-entering commands. Fixes #9206. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'pathd/path_nb.h')
-rw-r--r--pathd/path_nb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/pathd/path_nb.h b/pathd/path_nb.h
index caeadd9cc..6a918b8b8 100644
--- a/pathd/path_nb.h
+++ b/pathd/path_nb.h
@@ -112,10 +112,12 @@ void pathd_apply_finish(struct nb_cb_apply_finish_args *args);
/* Optional 'cli_show' callbacks. */
void cli_show_srte_segment_list(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
+void cli_show_srte_segment_list_end(struct vty *vty, struct lyd_node *dnode);
void cli_show_srte_segment_list_segment(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_srte_policy(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
+void cli_show_srte_policy_end(struct vty *vty, struct lyd_node *dnode);
void cli_show_srte_policy_name(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
void cli_show_srte_policy_binding_sid(struct vty *vty, struct lyd_node *dnode,
@@ -123,6 +125,8 @@ void cli_show_srte_policy_binding_sid(struct vty *vty, struct lyd_node *dnode,
void cli_show_srte_policy_candidate_path(struct vty *vty,
struct lyd_node *dnode,
bool show_defaults);
+void cli_show_srte_policy_candidate_path_end(struct vty *vty,
+ struct lyd_node *dnode);
/* Utility functions */
typedef void (*of_pref_cp_t)(enum objfun_type type, void *arg);