]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: set entry to xpath in if_update_to_new_vrf
authorMahdi Varasteh <mahdy.varasteh@gmail.com>
Sun, 8 Dec 2019 13:03:14 +0000 (16:33 +0330)
committerMahdi Varasteh <mahdy.varasteh@gmail.com>
Sun, 8 Dec 2019 13:03:14 +0000 (16:33 +0330)
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 <mahdy.varasteh@gmail.com>
lib/if.c

index 9c9252e1115ec32a80d456de05162deafe08e1a6..f2746dad35723ac68f661433c452d08099bd72e8 100644 (file)
--- 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++;
                        }
                }