summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-09-14 12:16:24 +0200
committerGitHub <noreply@github.com>2021-09-14 12:16:24 +0200
commitf17030115ff2e57d210bb6b113feb618f96cf72d (patch)
tree193a6c41d79cace54dfb927863d2eaaaf9829454 /lib
parentMerge pull request #9589 from donaldsharp/route_scale_cleanup (diff)
parentvrf_name_to_id(): remove (diff)
downloadfrr-f17030115ff2e57d210bb6b113feb618f96cf72d.tar.xz
frr-f17030115ff2e57d210bb6b113feb618f96cf72d.zip
Merge pull request #9364 from LabNConsulting/ziemba/vrf_name_to_id-unknown
vrf_name_to_id(): remove and change callers to use vrf_lookup_by_name()
Diffstat (limited to 'lib')
-rw-r--r--lib/vrf.c15
-rw-r--r--lib/vrf.h1
2 files changed, 0 insertions, 16 deletions
diff --git a/lib/vrf.c b/lib/vrf.c
index f9307d303..198d5253c 100644
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -384,21 +384,6 @@ const char *vrf_id_to_name(vrf_id_t vrf_id)
return VRF_LOGNAME(vrf);
}
-vrf_id_t vrf_name_to_id(const char *name)
-{
- struct vrf *vrf;
- vrf_id_t vrf_id = VRF_DEFAULT; // Pending: need a way to return invalid
- // id/ routine not used.
-
- if (!name)
- return vrf_id;
- vrf = vrf_lookup_by_name(name);
- if (vrf)
- vrf_id = vrf->vrf_id;
-
- return vrf_id;
-}
-
/* Get the data pointer of the specified VRF. If not found, create one. */
void *vrf_info_get(vrf_id_t vrf_id)
{
diff --git a/lib/vrf.h b/lib/vrf.h
index 9949ec411..dab83d42d 100644
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -119,7 +119,6 @@ extern struct vrf *vrf_lookup_by_name(const char *);
extern struct vrf *vrf_get(vrf_id_t, const char *);
extern struct vrf *vrf_update(vrf_id_t new_vrf_id, const char *name);
extern const char *vrf_id_to_name(vrf_id_t vrf_id);
-extern vrf_id_t vrf_name_to_id(const char *);
#define VRF_LOGNAME(V) V ? V->name : "Unknown"