netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] netns: export get_net_ns_by_id()
@ 2021-05-12 21:29 Sergey Ryazanov
  2021-05-14 19:14 ` Jakub Kicinski
  0 siblings, 1 reply; 6+ messages in thread
From: Sergey Ryazanov @ 2021-05-12 21:29 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski; +Cc: netdev, Nicolas Dichtel

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@6wind.com>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-17  7:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 21:29 [PATCH net] netns: export get_net_ns_by_id() Sergey Ryazanov
2021-05-14 19:14 ` Jakub Kicinski
2021-05-14 20:52   ` Sergey Ryazanov
2021-05-16 11:05     ` Leon Romanovsky
2021-05-16 13:47       ` Sergey Ryazanov
2021-05-17  7:18       ` Nicolas Dichtel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).