summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-10-14 19:15:14 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2021-10-28 18:54:46 +0300
commit35367f03504e984f620bd1af64090b21022b3a99 (patch)
treef350eb6a0b96d46f3779fe7f60ad3a17822c1a9d /lib/if.c
parenta2df495fdf21a08c8ab430303bd3c4e2e8c7f7a9 (diff)
lib: make if_lookup_by_index_all_vrf internal
This function doesn't work correctly with netns VRF backend as the same index may be used in multiple netns simultaneously. So let's hide it from the public API to reduce temptation to use it instead of writing the correct code. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/if.c b/lib/if.c
index 4d7862022c..7eaede78fd 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -47,6 +47,7 @@ DEFINE_MTYPE_STATIC(LIB, IF_LINK_PARAMS, "Informational Link Parameters");
static struct interface *if_lookup_by_ifindex(ifindex_t ifindex,
vrf_id_t vrf_id);
+static struct interface *if_lookup_by_index_all_vrf(ifindex_t ifindex);
static int if_cmp_func(const struct interface *, const struct interface *);
static int if_cmp_index_func(const struct interface *ifp1,
const struct interface *ifp2);
@@ -448,7 +449,7 @@ struct interface *if_lookup_by_name_all_vrf(const char *name)
return NULL;
}
-struct interface *if_lookup_by_index_all_vrf(ifindex_t ifindex)
+static struct interface *if_lookup_by_index_all_vrf(ifindex_t ifindex)
{
struct vrf *vrf;
struct interface *ifp;