diff options
| author | Quentin Young <qlyoung@users.noreply.github.com> | 2020-09-25 13:05:21 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-25 13:05:21 -0400 |
| commit | ea8dd244aa35114043b51ea988a5bd170f9e0511 (patch) | |
| tree | ac292874c50b2a828ae1fc6d588964efe0bd1b7e /ripd/ripd.c | |
| parent | b1f476731a002fae9c65127314cbad12786f3719 (diff) | |
| parent | 3704ff5608a9624a92c02dcae437f4c7d05da347 (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.c | 7 |
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++; } } |
