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, 2 insertions, 14 deletions
diff --git a/lib/vrf.c b/lib/vrf.c
index a7e9b256f..1a9cd7e45 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -39,8 +39,7 @@
#include "northbound.h"
#include "northbound_cli.h"
-/* default VRF ID value used when VRF backend is not NETNS */
-#define VRF_DEFAULT_INTERNAL 0
+/* default VRF name value used when VRF backend is not NETNS */
#define VRF_DEFAULT_NAME_INTERNAL "default"
DEFINE_MTYPE_STATIC(LIB, VRF, "VRF")
@@ -521,7 +520,7 @@ void vrf_init(int (*create)(struct vrf *), int (*enable)(struct vrf *),
strlcpy(default_vrf->data.l.netns_name,
VRF_DEFAULT_NAME, NS_NAMSIZ);
- ns = ns_lookup(ns_get_default_id());
+ ns = ns_lookup(NS_DEFAULT);
ns->vrf_ctxt = default_vrf;
default_vrf->ns_ctxt = ns;
}
@@ -949,17 +948,6 @@ const char *vrf_get_default_name(void)
return vrf_default_name;
}
-vrf_id_t vrf_get_default_id(void)
-{
- /* backend netns is only known by zebra
- * for other daemons, we return VRF_DEFAULT_INTERNAL
- */
- if (vrf_is_backend_netns())
- return ns_get_default_id();
- else
- return VRF_DEFAULT_INTERNAL;
-}
-
int vrf_bind(vrf_id_t vrf_id, int fd, const char *name)
{
int ret = 0;