diff options
Diffstat (limited to 'ripd/ripd.c')
| -rw-r--r-- | ripd/ripd.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c index 145b4de0a0..346c11ad30 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -3606,43 +3606,6 @@ static int rip_vrf_enable(struct vrf *vrf) int socket; rip = rip_lookup_by_vrf_name(vrf->name); - if (!rip) { - char *old_vrf_name = NULL; - - rip = (struct rip *)vrf->info; - if (!rip) - return 0; - /* update vrf name */ - if (rip->vrf_name) - old_vrf_name = rip->vrf_name; - rip->vrf_name = XSTRDUP(MTYPE_RIP_VRF_NAME, vrf->name); - /* - * HACK: Change the RIP VRF in the running configuration directly, - * bypassing the northbound layer. This is necessary to avoid deleting - * the RIP and readding it in the new VRF, which would have - * several implications. - */ - 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_getf( - running_config->dnode, - "/frr-ripd:ripd/instance[vrf='%s']/vrf", - old_vrf_name); - if (rip_dnode) { - yang_dnode_get_path(lyd_parent(rip_dnode), - oldpath, sizeof(oldpath)); - yang_dnode_change_leaf(rip_dnode, vrf->name); - yang_dnode_get_path(lyd_parent(rip_dnode), - newpath, sizeof(newpath)); - nb_running_move_tree(oldpath, newpath); - running_config->version++; - } - } - XFREE(MTYPE_RIP_VRF_NAME, old_vrf_name); - } if (!rip || rip->enabled) return 0; @@ -3683,8 +3646,7 @@ static int rip_vrf_disable(struct vrf *vrf) void rip_vrf_init(void) { - vrf_init(rip_vrf_new, rip_vrf_enable, rip_vrf_disable, rip_vrf_delete, - rip_vrf_enable); + vrf_init(rip_vrf_new, rip_vrf_enable, rip_vrf_disable, rip_vrf_delete); vrf_cmd_init(NULL); } |
