From c6982533ba5769a590d089fa1eebf17a7ec0277b Mon Sep 17 00:00:00 2001 From: Mahdi Varasteh Date: Sun, 8 Dec 2019 16:33:14 +0330 Subject: [PATCH] lib: set entry to xpath in if_update_to_new_vrf when vrf is changed, we change the interface running configuration without using northbound layer. it causes the nb_running_get_entry to fail 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 9c9252e111..f2746dad35 100644 --- a/lib/if.c +++ b/lib/if.c @@ -218,7 +218,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