summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorMahdi Varasteh <mahdy.varasteh@gmail.com>2019-12-10 08:35:17 +0330
committerMahdi Varasteh <mahdy.varasteh@gmail.com>2019-12-10 08:38:45 +0330
commitced28861d497d346d28e51b85678a66d934b0482 (patch)
tree3e1ef884867e1814a4600976f8cb7431b337cfac /lib/if.c
parent0dcbec72aa2b508c194ec4391b6d821ea996fb08 (diff)
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 <mahdy.varasteh@gmail.com>
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c2
1 files changed, 2 insertions, 0 deletions
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++;
}
}