aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/netfilter_ipv4
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2019-08-07 15:17:03 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-08-13 12:15:18 +0200
commit78458e3e08cda2aacaec9fde8c295dfc2f88618a (patch)
tree8bb8819e0c2895d179a1513608079bb03994498b /include/linux/netfilter_ipv4
parentnetfilter: add missing IS_ENABLED(CONFIG_NF_CONNTRACK) checks to some header-files. (diff)
downloadwireguard-linux-78458e3e08cda2aacaec9fde8c295dfc2f88618a.tar.xz
wireguard-linux-78458e3e08cda2aacaec9fde8c295dfc2f88618a.zip
netfilter: add missing IS_ENABLED(CONFIG_NETFILTER) checks to some header-files.
linux/netfilter.h defines a number of struct and inline function definitions which are only available is CONFIG_NETFILTER is enabled. These structs and functions are used in declarations and definitions in other header-files. Added preprocessor checks to make sure these headers will compile if CONFIG_NETFILTER is disabled. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/netfilter_ipv4')
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index d026e63a5aa4..f40a65481df4 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -25,11 +25,13 @@
extern void ipt_init(void) __init;
+#if IS_ENABLED(CONFIG_NETFILTER)
int ipt_register_table(struct net *net, const struct xt_table *table,
const struct ipt_replace *repl,
const struct nf_hook_ops *ops, struct xt_table **res);
void ipt_unregister_table(struct net *net, struct xt_table *table,
const struct nf_hook_ops *ops);
+#endif
/* Standard entry. */
struct ipt_standard {
@@ -65,9 +67,11 @@ struct ipt_error {
}
extern void *ipt_alloc_initial_table(const struct xt_table *);
+#if IS_ENABLED(CONFIG_NETFILTER)
extern unsigned int ipt_do_table(struct sk_buff *skb,
const struct nf_hook_state *state,
struct xt_table *table);
+#endif
#ifdef CONFIG_COMPAT
#include <net/compat.h>