summaryrefslogtreecommitdiff
path: root/zebra/zebra_vrf.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r--zebra/zebra_vrf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
index c7781e86d8..7bfe07b4cf 100644
--- a/zebra/zebra_vrf.c
+++ b/zebra/zebra_vrf.c
@@ -98,6 +98,14 @@ static int zebra_vrf_new(struct vrf *vrf)
zvrf = zebra_vrf_alloc(vrf);
if (!vrf_is_backend_netns())
zvrf->zns = zebra_ns_lookup(NS_DEFAULT);
+ else if (vrf->vrf_id == VRF_DEFAULT) {
+ struct ns *ns;
+
+ strlcpy(vrf->data.l.netns_name, VRF_DEFAULT_NAME, NS_NAMSIZ);
+ ns = ns_lookup(NS_DEFAULT);
+ ns->vrf_ctxt = vrf;
+ vrf->ns_ctxt = ns;
+ }
otable_init(&zvrf->other_tables);