mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
UPSTREAM: bpf, net: Fix build issue when net ns not configured
Fix a redefinition of 'net_gen_cookie' error that was overlooked
when net ns is not configured.
Fixes: f318903c0bf4 ("bpf: Add netns cookie and enable it for bpf cgroup hooks")
Reported-by: kbuild test robot <lkp@intel.com>
Change-Id: Icec4b9f3709553111048d3389f6cd28e8e05f68e
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
b9b87cb0e6
commit
92074107e8
1 changed files with 2 additions and 7 deletions
|
|
@ -237,6 +237,8 @@ extern struct list_head net_namespace_list;
|
|||
struct net *get_net_ns_by_pid(pid_t pid);
|
||||
struct net *get_net_ns_by_fd(int fd);
|
||||
|
||||
u64 net_gen_cookie(struct net *net);
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
void ipx_register_sysctl(void);
|
||||
void ipx_unregister_sysctl(void);
|
||||
|
|
@ -285,8 +287,6 @@ static inline int check_net(const struct net *net)
|
|||
|
||||
void net_drop_ns(void *);
|
||||
|
||||
u64 net_gen_cookie(struct net *net);
|
||||
|
||||
#else
|
||||
|
||||
static inline struct net *get_net(struct net *net)
|
||||
|
|
@ -314,11 +314,6 @@ static inline int check_net(const struct net *net)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static inline u64 net_gen_cookie(struct net *net)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define net_drop_ns NULL
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue