diff options
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/main.c | 6 | ||||
-rw-r--r-- | zebra/zebra_vrf.c | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/zebra/main.c b/zebra/main.c index d189d1e0a..fd242e762 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -360,8 +360,6 @@ int main(int argc, char **argv) if_notify_oper_changes = true; vrf_notify_oper_changes = true; - vrf_configure_backend(VRF_BACKEND_VRF_LITE); - frr_preinit(&zebra_di, argc, argv); frr_opt_add("baz:e:rK:s:R:" @@ -379,7 +377,7 @@ int main(int argc, char **argv) " --v6-with-v4-nexthops Underlying dataplane supports v6 routes with v4 nexthops\n" #ifdef HAVE_NETLINK " -s, --nl-bufsize Set netlink receive buffer size\n" - " -n, --vrfwnetns Use NetNS as VRF backend\n" + " -n, --vrfwnetns Use NetNS as VRF backend (deprecated, use -w)\n" " --v6-rr-semantics Use v6 RR semantics\n" #else " -s, Set kernel socket receive buffer size\n" @@ -440,6 +438,8 @@ int main(int argc, char **argv) break; #ifdef HAVE_NETLINK case 'n': + fprintf(stderr, + "The -n option is deprecated, please use global -w option instead.\n"); vrf_configure_backend(VRF_BACKEND_NETNS); break; case OPTION_V6_RR_SEMANTICS: diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index c7781e86d..7bfe07b4c 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); |