[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210512212956.4727-1-ryazanov.s.a@gmail.com>
Date: Thu, 13 May 2021 00:29:56 +0300
From: Sergey Ryazanov <ryazanov.s.a@...il.com>
To: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, Nicolas Dichtel <nicolas.dichtel@...nd.com>
Subject: [PATCH net] netns: export get_net_ns_by_id()
No one loadable module is able to obtain netns by id since the
corresponding function has not been exported. Export it to be able to
use netns id API in loadable modules too as already done for
peernet2id_alloc().
CC: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@...il.com>
---
net/core/net_namespace.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 43b6ac4c4439..0414406ed664 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -306,6 +306,7 @@ struct net *get_net_ns_by_id(const struct net *net, int id)
return peer;
}
+EXPORT_SYMBOL_GPL(get_net_ns_by_id);
/*
* setup_net runs the initializers for the network namespace object.
--
2.26.3
Powered by blists - more mailing lists