diff options
Diffstat (limited to 'include/net/net_namespace.h')
| -rw-r--r-- | include/net/net_namespace.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 9d22f08896c6..da68c9a90ac5 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 22 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
| 23 | #include <net/netns/conntrack.h> | 23 | #include <net/netns/conntrack.h> |
| 24 | #endif | 24 | #endif |
| 25 | #include <net/netns/nftables.h> | ||
| 25 | #include <net/netns/xfrm.h> | 26 | #include <net/netns/xfrm.h> |
| 26 | 27 | ||
| 27 | struct user_namespace; | 28 | struct user_namespace; |
| @@ -101,6 +102,9 @@ struct net { | |||
| 101 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 102 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
| 102 | struct netns_ct ct; | 103 | struct netns_ct ct; |
| 103 | #endif | 104 | #endif |
| 105 | #if defined(CONFIG_NF_TABLES) || defined(CONFIG_NF_TABLES_MODULE) | ||
| 106 | struct netns_nftables nft; | ||
| 107 | #endif | ||
| 104 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 108 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 105 | struct netns_nf_frag nf_frag; | 109 | struct netns_nf_frag nf_frag; |
| 106 | #endif | 110 | #endif |
| @@ -137,8 +141,8 @@ struct net { | |||
| 137 | extern struct net init_net; | 141 | extern struct net init_net; |
| 138 | 142 | ||
| 139 | #ifdef CONFIG_NET_NS | 143 | #ifdef CONFIG_NET_NS |
| 140 | extern struct net *copy_net_ns(unsigned long flags, | 144 | struct net *copy_net_ns(unsigned long flags, struct user_namespace *user_ns, |
| 141 | struct user_namespace *user_ns, struct net *old_net); | 145 | struct net *old_net); |
| 142 | 146 | ||
| 143 | #else /* CONFIG_NET_NS */ | 147 | #else /* CONFIG_NET_NS */ |
| 144 | #include <linux/sched.h> | 148 | #include <linux/sched.h> |
| @@ -155,11 +159,11 @@ static inline struct net *copy_net_ns(unsigned long flags, | |||
| 155 | 159 | ||
| 156 | extern struct list_head net_namespace_list; | 160 | extern struct list_head net_namespace_list; |
| 157 | 161 | ||
| 158 | extern struct net *get_net_ns_by_pid(pid_t pid); | 162 | struct net *get_net_ns_by_pid(pid_t pid); |
| 159 | extern struct net *get_net_ns_by_fd(int pid); | 163 | struct net *get_net_ns_by_fd(int pid); |
| 160 | 164 | ||
| 161 | #ifdef CONFIG_NET_NS | 165 | #ifdef CONFIG_NET_NS |
| 162 | extern void __put_net(struct net *net); | 166 | void __put_net(struct net *net); |
| 163 | 167 | ||
| 164 | static inline struct net *get_net(struct net *net) | 168 | static inline struct net *get_net(struct net *net) |
| 165 | { | 169 | { |
| @@ -191,7 +195,7 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
| 191 | return net1 == net2; | 195 | return net1 == net2; |
| 192 | } | 196 | } |
| 193 | 197 | ||
| 194 | extern void net_drop_ns(void *); | 198 | void net_drop_ns(void *); |
| 195 | 199 | ||
| 196 | #else | 200 | #else |
| 197 | 201 | ||
| @@ -308,19 +312,19 @@ struct pernet_operations { | |||
| 308 | * device which caused kernel oops, and panics during network | 312 | * device which caused kernel oops, and panics during network |
| 309 | * namespace cleanup. So please don't get this wrong. | 313 | * namespace cleanup. So please don't get this wrong. |
| 310 | */ | 314 | */ |
| 311 | extern int register_pernet_subsys(struct pernet_operations *); | 315 | int register_pernet_subsys(struct pernet_operations *); |
| 312 | extern void unregister_pernet_subsys(struct pernet_operations *); | 316 | void unregister_pernet_subsys(struct pernet_operations *); |
| 313 | extern int register_pernet_device(struct pernet_operations *); | 317 | int register_pernet_device(struct pernet_operations *); |
| 314 | extern void unregister_pernet_device(struct pernet_operations *); | 318 | void unregister_pernet_device(struct pernet_operations *); |
| 315 | 319 | ||
| 316 | struct ctl_table; | 320 | struct ctl_table; |
| 317 | struct ctl_table_header; | 321 | struct ctl_table_header; |
| 318 | 322 | ||
| 319 | #ifdef CONFIG_SYSCTL | 323 | #ifdef CONFIG_SYSCTL |
| 320 | extern int net_sysctl_init(void); | 324 | int net_sysctl_init(void); |
| 321 | extern struct ctl_table_header *register_net_sysctl(struct net *net, | 325 | struct ctl_table_header *register_net_sysctl(struct net *net, const char *path, |
| 322 | const char *path, struct ctl_table *table); | 326 | struct ctl_table *table); |
| 323 | extern void unregister_net_sysctl_table(struct ctl_table_header *header); | 327 | void unregister_net_sysctl_table(struct ctl_table_header *header); |
| 324 | #else | 328 | #else |
| 325 | static inline int net_sysctl_init(void) { return 0; } | 329 | static inline int net_sysctl_init(void) { return 0; } |
| 326 | static inline struct ctl_table_header *register_net_sysctl(struct net *net, | 330 | static inline struct ctl_table_header *register_net_sysctl(struct net *net, |
