summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bfdd/bfd.c6
-rw-r--r--ripd/ripd.c7
-rw-r--r--ripngd/ripngd.c7
3 files changed, 20 insertions, 0 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c
index c16912060..4877abd57 100644
--- a/bfdd/bfd.c
+++ b/bfdd/bfd.c
@@ -2158,6 +2158,7 @@ void bfd_session_update_vrf_name(struct bfd_session *bs, struct vrf *vrf)
if (yang_module_find("frr-bfdd") && bs->key.vrfname[0]) {
struct lyd_node *bfd_dnode;
char xpath[XPATH_MAXLEN], xpath_srcaddr[XPATH_MAXLEN + 32];
+ char oldpath[XPATH_MAXLEN], newpath[XPATH_MAXLEN];
char addr_buf[INET6_ADDRSTRLEN];
int slen;
@@ -2185,7 +2186,12 @@ void bfd_session_update_vrf_name(struct bfd_session *bs, struct vrf *vrf)
bfd_dnode = yang_dnode_get(running_config->dnode, xpath,
bs->key.vrfname);
if (bfd_dnode) {
+ yang_dnode_get_path(bfd_dnode->parent, oldpath,
+ sizeof(oldpath));
yang_dnode_change_leaf(bfd_dnode, vrf->name);
+ yang_dnode_get_path(bfd_dnode->parent, newpath,
+ sizeof(newpath));
+ nb_running_move_tree(oldpath, newpath);
running_config->version++;
}
}
diff --git a/ripd/ripd.c b/ripd/ripd.c
index ecadf8fb7..bcf73e8f8 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++;
}
}
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index bf6c6ff27..8a7950daf 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -2791,13 +2791,20 @@ static int ripng_vrf_enable(struct vrf *vrf)
*/
if (yang_module_find("frr-ripngd") && old_vrf_name) {
struct lyd_node *ripng_dnode;
+ char oldpath[XPATH_MAXLEN];
+ char newpath[XPATH_MAXLEN];
ripng_dnode = yang_dnode_get(
running_config->dnode,
"/frr-ripngd:ripngd/instance[vrf='%s']/vrf",
old_vrf_name);
if (ripng_dnode) {
+ yang_dnode_get_path(ripng_dnode->parent, oldpath,
+ sizeof(oldpath));
yang_dnode_change_leaf(ripng_dnode, vrf->name);
+ yang_dnode_get_path(ripng_dnode->parent, newpath,
+ sizeof(newpath));
+ nb_running_move_tree(oldpath, newpath);
running_config->version++;
}
}