Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

+2 -7
+2 -7
include/net/net_namespace.h
··· 228 228 struct net *get_net_ns_by_pid(pid_t pid); 229 229 struct net *get_net_ns_by_fd(int fd); 230 230 231 + u64 net_gen_cookie(struct net *net); 232 + 231 233 #ifdef CONFIG_SYSCTL 232 234 void ipx_register_sysctl(void); 233 235 void ipx_unregister_sysctl(void); ··· 278 276 279 277 void net_drop_ns(void *); 280 278 281 - u64 net_gen_cookie(struct net *net); 282 - 283 279 #else 284 280 285 281 static inline struct net *get_net(struct net *net) ··· 303 303 static inline int check_net(const struct net *net) 304 304 { 305 305 return 1; 306 - } 307 - 308 - static inline u64 net_gen_cookie(struct net *net) 309 - { 310 - return 0; 311 306 } 312 307 313 308 #define net_drop_ns NULL