summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_netns_id.c9
-rw-r--r--zebra/zebra_ns.c2
2 files changed, 4 insertions, 7 deletions
diff --git a/zebra/zebra_netns_id.c b/zebra/zebra_netns_id.c
index 79121bb086..3201c438cd 100644
--- a/zebra/zebra_netns_id.c
+++ b/zebra/zebra_netns_id.c
@@ -39,9 +39,6 @@
#include "zebra/zebra_netns_id.h"
#include "zebra/zebra_errors.h"
-/* default NS ID value used when VRF backend is not NETNS */
-#define NS_DEFAULT_INTERNAL 0
-
/* in case NEWNSID not available, the NSID will be locally obtained
*/
#define NS_BASE_NSID 0
@@ -362,14 +359,14 @@ ns_id_t zebra_ns_id_get_default(void)
fd = open(NS_DEFAULT_NAME, O_RDONLY);
if (fd == -1)
- return NS_DEFAULT_INTERNAL;
+ return NS_DEFAULT;
if (!vrf_is_backend_netns()) {
close(fd);
- return NS_DEFAULT_INTERNAL;
+ return NS_DEFAULT;
}
close(fd);
return zebra_ns_id_get((char *)NS_DEFAULT_NAME, -1);
#else /* HAVE_NETNS */
- return NS_DEFAULT_INTERNAL;
+ return NS_DEFAULT;
#endif /* !HAVE_NETNS */
}
diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c
index 6462daf687..e9ff3fcc08 100644
--- a/zebra/zebra_ns.c
+++ b/zebra/zebra_ns.c
@@ -199,7 +199,7 @@ int zebra_ns_init(const char *optional_default_name)
if (ns)
ns->relative_default_ns = ns_id;
- default_ns = ns_lookup(ns_get_default_id());
+ default_ns = ns_lookup(NS_DEFAULT);
if (!default_ns) {
flog_err(EC_ZEBRA_NS_NO_DEFAULT,
"%s: failed to find default ns", __func__);