diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-08-29 09:27:17 +0200 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-08-29 09:27:17 +0200 |
commit | 2ed3953cccd505c13d9f1fd17bdf7063a4fefbb7 (patch) | |
tree | e6d985a6609eb91455b635e0780f8ef3bc4eca27 /lib | |
parent | Merge pull request #2932 from donaldsharp/ferr_fix (diff) | |
download | frr-2ed3953cccd505c13d9f1fd17bdf7063a4fefbb7.tar.xz frr-2ed3953cccd505c13d9f1fd17bdf7063a4fefbb7.zip |
lib: remove spurious message when netns is not available
remove spurious message when netns is not available.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/netns_linux.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/netns_linux.c b/lib/netns_linux.c index b8eaa72c2..33338ac89 100644 --- a/lib/netns_linux.c +++ b/lib/netns_linux.c @@ -468,21 +468,12 @@ void ns_init(void) if (ns_initialised == 1) return; errno = 0; -#ifdef HAVE_NETNS - if (have_netns_enabled < 0) { + if (have_netns()) ns_default_ns_fd = open(NS_DEFAULT_NAME, O_RDONLY); - if (ns_default_ns_fd == -1) - flog_err(LIB_ERR_NS, - "NS initialization failure %d(%s)", errno, - safe_strerror(errno)); - } else { + else { ns_default_ns_fd = -1; default_ns = NULL; } -#else - ns_default_ns_fd = -1; - default_ns = NULL; -#endif /* HAVE_NETNS */ ns_current_ns_fd = -1; ns_initialised = 1; } |