summaryrefslogtreecommitdiff
path: root/ripd/ripd.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2020-09-25 13:05:21 -0400
committerGitHub <noreply@github.com>2020-09-25 13:05:21 -0400
commitea8dd244aa35114043b51ea988a5bd170f9e0511 (patch)
treeac292874c50b2a828ae1fc6d588964efe0bd1b7e /ripd/ripd.c
parentb1f476731a002fae9c65127314cbad12786f3719 (diff)
parent3704ff5608a9624a92c02dcae437f4c7d05da347 (diff)
Merge pull request #7175 from idryzhov/fix-nb-bypass
*: move all userdata when changing node xpath
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r--ripd/ripd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index ecadf8fb71..bcf73e8f89 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -3667,13 +3667,20 @@ static int rip_vrf_enable(struct vrf *vrf)
*/
if (yang_module_find("frr-ripd") && old_vrf_name) {
struct lyd_node *rip_dnode;
+ char oldpath[XPATH_MAXLEN];
+ char newpath[XPATH_MAXLEN];
rip_dnode = yang_dnode_get(
running_config->dnode,
"/frr-ripd:ripd/instance[vrf='%s']/vrf",
old_vrf_name);
if (rip_dnode) {
+ yang_dnode_get_path(rip_dnode->parent, oldpath,
+ sizeof(oldpath));
yang_dnode_change_leaf(rip_dnode, vrf->name);
+ yang_dnode_get_path(rip_dnode->parent, newpath,
+ sizeof(newpath));
+ nb_running_move_tree(oldpath, newpath);
running_config->version++;
}
}