aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index a71264d75d7f..9b5fdc50519a 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -10,6 +10,7 @@
10#include <linux/workqueue.h> 10#include <linux/workqueue.h>
11#include <linux/list.h> 11#include <linux/list.h>
12#include <linux/sysctl.h> 12#include <linux/sysctl.h>
13#include <linux/uidgid.h>
13 14
14#include <net/flow.h> 15#include <net/flow.h>
15#include <net/netns/core.h> 16#include <net/netns/core.h>
@@ -170,6 +171,8 @@ extern struct net init_net;
170struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns, 171struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns,
171 struct net *old_net); 172 struct net *old_net);
172 173
174void net_ns_get_ownership(const struct net *net, kuid_t *uid, kgid_t *gid);
175
173void net_ns_barrier(void); 176void net_ns_barrier(void);
174#else /* CONFIG_NET_NS */ 177#else /* CONFIG_NET_NS */
175#include <linux/sched.h> 178#include <linux/sched.h>
@@ -182,6 +185,13 @@ static inline struct net *copy_net_ns(unsigned long flags,
182 return old_net; 185 return old_net;
183} 186}
184 187
188static inline void net_ns_get_ownership(const struct net *net,
189 kuid_t *uid, kgid_t *gid)
190{
191 *uid = GLOBAL_ROOT_UID;
192 *gid = GLOBAL_ROOT_GID;
193}
194
185static inline void net_ns_barrier(void) {} 195static inline void net_ns_barrier(void) {}
186#endif /* CONFIG_NET_NS */ 196#endif /* CONFIG_NET_NS */
187 197