summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/if.c2
-rw-r--r--lib/vrf.c7
-rw-r--r--lib/vrf.h1
-rw-r--r--zebra/main.c2
4 files changed, 1 insertions, 11 deletions
diff --git a/lib/if.c b/lib/if.c
index 796929ef0..68724a65e 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -416,7 +416,6 @@ static struct interface *if_lookup_by_ifindex(ifindex_t ifindex,
struct interface *if_lookup_by_index(ifindex_t ifindex, vrf_id_t vrf_id)
{
switch (vrf_get_backend()) {
- case VRF_BACKEND_UNKNOWN:
case VRF_BACKEND_NETNS:
return(if_lookup_by_ifindex(ifindex, vrf_id));
case VRF_BACKEND_VRF_LITE:
@@ -686,7 +685,6 @@ struct interface *if_get_by_name(const char *name, vrf_id_t vrf_id,
struct vrf *vrf;
switch (vrf_get_backend()) {
- case VRF_BACKEND_UNKNOWN:
case VRF_BACKEND_NETNS:
vrf = vrf_get(vrf_id, vrf_name);
assert(vrf);
diff --git a/lib/vrf.c b/lib/vrf.c
index 9be8a9faa..e57611116 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;
/*
@@ -654,8 +653,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 +660,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 +668,6 @@ int vrf_configure_backend(enum vrf_backend_type backend)
}
vrf_backend = backend;
- vrf_backend_configured = 1;
return 0;
}
diff --git a/lib/vrf.h b/lib/vrf.h
index ad302de9b..46d72910c 100644
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -94,7 +94,6 @@ DECLARE_QOBJ_TYPE(vrf);
enum vrf_backend_type {
VRF_BACKEND_VRF_LITE,
VRF_BACKEND_NETNS,
- VRF_BACKEND_UNKNOWN,
VRF_BACKEND_MAX,
};
diff --git a/zebra/main.c b/zebra/main.c
index d189d1e0a..f84bfa6eb 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:"