History

net: netfilter: move bpf_ct_set_nat_info kfunc in nf_nat_bpf.c

Remove circular dependency between nf_nat module and nf_conntrack one moving bpf_ct_set_nat_info kfunc in nf_nat_bpf.c

Lorenzo Bianconi committed 4 years ago

Commit 820dc051 parent 736baae5 files · +106 −52Browse files

Showing the changes to include/net (1 of 5 files). Show all

Unified · Split

include/net/netfilter/nf_conntrack_bpf.h+19−0
@@ -4,6 +4,11 @@ · 3 unmodified lines
44 #define _NF_CONNTRACK_BPF_H
55
66 #include <linux/kconfig.h>
7+#include <net/netfilter/nf_conntrack.h>
8+
9+struct nf_conn___init {
10+ struct nf_conn ct;
11+};
712
813 #if (IS_BUILTIN(CONFIG_NF_CONNTRACK) && IS_ENABLED(CONFIG_DEBUG_INFO_BTF)) || \
914 (IS_MODULE(CONFIG_NF_CONNTRACK) && IS_ENABLED(CONFIG_DEBUG_INFO_BTF_MODULES))
@@ -24,4 +29,18 @@ static inline void cleanup_nf_conntrack_bpf(void) · 14 unmodified lines
2429
2530 #endif
2631
32+#if (IS_BUILTIN(CONFIG_NF_NAT) && IS_ENABLED(CONFIG_DEBUG_INFO_BTF)) || \
33+ (IS_MODULE(CONFIG_NF_NAT) && IS_ENABLED(CONFIG_DEBUG_INFO_BTF_MODULES))
34+
35+extern int register_nf_nat_bpf(void);
36+
37+#else
38+
39+static inline int register_nf_nat_bpf(void)
40+{
41+ return 0;
42+}
43+
44+#endif
45+
2746 #endif /* _NF_CONNTRACK_BPF_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t