diff options
author | Christophe Gouault <christophe.gouault@6wind.com> | 2020-08-24 18:01:15 +0200 |
---|---|---|
committer | Christophe Gouault <christophe.gouault@6wind.com> | 2020-09-21 10:17:35 +0200 |
commit | 1eb92f06c4e39a47a82ae585cfb276497843de6c (patch) | |
tree | 17ee7490850320dc573b80d0668da464cec41526 /lib/netns_linux.c | |
parent | zebra: always display vrf in show ip route json (diff) | |
download | frr-1eb92f06c4e39a47a82ae585cfb276497843de6c.tar.xz frr-1eb92f06c4e39a47a82ae585cfb276497843de6c.zip |
vrf: VRF_DEFAULT must be 0, remove useless code
Code was added in the past to support a value of VRF_DEFAULT different
from 0. This option was abandoned, the default vrf id is always 0.
Remove this code, this will simplify the code and improve performance
(use a constant value instead of a function that performs tests).
Signed-off-by: Christophe Gouault <christophe.gouault@6wind.com>
Diffstat (limited to 'lib/netns_linux.c')
-rw-r--r-- | lib/netns_linux.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/netns_linux.c b/lib/netns_linux.c index e8d549b4e..c68843398 100644 --- a/lib/netns_linux.c +++ b/lib/netns_linux.c @@ -43,9 +43,6 @@ DEFINE_MTYPE_STATIC(LIB, NS, "NetNS Context") DEFINE_MTYPE_STATIC(LIB, NS_NAME, "NetNS Name") -/* default NS ID value used when VRF backend is not NETNS */ -#define NS_DEFAULT_INTERNAL 0 - static inline int ns_compare(const struct ns *ns, const struct ns *ns2); static struct ns *ns_lookup_name_internal(const char *name); @@ -101,9 +98,6 @@ static inline int setns(int fd, int nstype) static int have_netns_enabled = -1; #endif /* HAVE_NETNS */ -/* default NS ID value used when VRF backend is not NETNS */ -#define NS_DEFAULT_INTERNAL 0 - static int have_netns(void) { #ifdef HAVE_NETNS @@ -612,15 +606,7 @@ ns_id_t ns_id_get_absolute(ns_id_t ns_id_reference, ns_id_t link_nsid) return ns->ns_id; } -ns_id_t ns_get_default_id(void) -{ - if (default_ns) - return default_ns->ns_id; - return NS_DEFAULT_INTERNAL; -} - struct ns *ns_get_default(void) { return default_ns; } - |