Thread (30 messages) flat view 30 messages, 2 authors, 2017-03-12
STALE3457d

[PATCH net-next RFC v1 04/27] afnetns: add net_afnetns

From: Hannes Frederic Sowa <hidden>
Date: 2017-03-12 23:02:08
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Signed-off-by: Hannes Frederic Sowa <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help