summaryrefslogtreecommitdiffstats
path: root/lib/vrf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vrf.c')
-rw-r--r--lib/vrf.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/vrf.c b/lib/vrf.c
index 9be8a9faa..0b39d9360 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -42,8 +42,7 @@ RB_GENERATE(vrf_name_head, vrf, name_entry, vrf_name_compare);
struct vrf_id_head vrfs_by_id = RB_INITIALIZER(&vrfs_by_id);
struct vrf_name_head vrfs_by_name = RB_INITIALIZER(&vrfs_by_name);
-static int vrf_backend;
-static int vrf_backend_configured;
+static int vrf_backend = VRF_BACKEND_VRF_LITE;
static char vrf_default_name[VRF_NAMSIZ] = VRF_DEFAULT_NAME_INTERNAL;
/*
@@ -582,15 +581,6 @@ void vrf_init(int (*create)(struct vrf *), int (*enable)(struct vrf *),
"vrf_init: failed to create the default VRF!");
exit(1);
}
- if (vrf_is_backend_netns()) {
- struct ns *ns;
-
- strlcpy(default_vrf->data.l.netns_name,
- VRF_DEFAULT_NAME, NS_NAMSIZ);
- ns = ns_lookup(NS_DEFAULT);
- ns->vrf_ctxt = default_vrf;
- default_vrf->ns_ctxt = ns;
- }
/* Enable the default VRF. */
if (!vrf_enable(default_vrf)) {
@@ -654,8 +644,6 @@ int vrf_is_backend_netns(void)
int vrf_get_backend(void)
{
- if (!vrf_backend_configured)
- return VRF_BACKEND_UNKNOWN;
return vrf_backend;
}
@@ -663,7 +651,6 @@ int vrf_configure_backend(enum vrf_backend_type backend)
{
/* Work around issue in old gcc */
switch (backend) {
- case VRF_BACKEND_UNKNOWN:
case VRF_BACKEND_NETNS:
case VRF_BACKEND_VRF_LITE:
break;
@@ -672,7 +659,6 @@ int vrf_configure_backend(enum vrf_backend_type backend)
}
vrf_backend = backend;
- vrf_backend_configured = 1;
return 0;
}