From ced28861d497d346d28e51b85678a66d934b0482 Mon Sep 17 00:00:00 2001 From: Mahdi Varasteh Date: Tue, 10 Dec 2019 08:35:17 +0330 Subject: [PATCH] lib: fixes invalid running_entry when VRF is changed we just unset the entry from old node and add it to the new one Signed-off-by: Mahdi Varasteh --- lib/if.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/if.c b/lib/if.c index 20215640e6..31c1d9e8ba 100644 --- a/lib/if.c +++ b/lib/if.c @@ -262,7 +262,9 @@ void if_update_to_new_vrf(struct interface *ifp, vrf_id_t vrf_id) "/frr-interface:lib/interface[name='%s'][vrf='%s']/vrf", ifp->name, old_vrf->name); if (if_dnode) { + nb_running_unset_entry(if_dnode->parent); yang_dnode_change_leaf(if_dnode, vrf->name); + nb_running_set_entry(if_dnode->parent, ifp); running_config->version++; } } -- 2.39.5