[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170312230151.5185-5-hannes@stressinduktion.org>
Date: Mon, 13 Mar 2017 00:01:28 +0100
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: netdev@...r.kernel.org
Subject: [PATCH net-next RFC v1 04/27] afnetns: add net_afnetns
Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
---
include/net/net_namespace.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index c59fb018da5e46..9be39b8315a6f9 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -244,6 +244,14 @@ int net_eq(const struct net *net1, const struct net *net2)
#define net_drop_ns NULL
#endif
+static inline struct afnetns *net_afnetns(struct net *net)
+{
+#if IS_ENABLED(CONFIG_AFNETNS)
+ return net->afnet_ns;
+#else
+ return NULL;
+#endif
+}
typedef struct {
#ifdef CONFIG_NET_NS
--
2.9.3
Powered by blists - more mailing lists