[PATCH nf-next v2 26/30] netfilter: add CONFIG_NETFILTER check to linux/netfilter.h.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The bulk of this header is already wrapped in CONFIG_NETFILTER or
CONFIG_NF_CONNTRACK checks.  The last few definitions are also only
required if CONFIG_NETFILTER is enabled.  Add another conditional for
that remainder.

Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
---
 include/linux/netfilter.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 3bed59528fed..075d48ef6a48 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -16,6 +16,7 @@
 #include <net/net_namespace.h>
 
 #ifdef CONFIG_NETFILTER
+
 static inline int NF_DROP_GETERR(int verdict)
 {
 	return -(verdict >> NF_VERDICT_QBITS);
@@ -415,11 +416,13 @@ static inline int nf_hook(u_int8_t pf, unsigned int hook, struct net *net,
 {
 	return 1;
 }
+
 struct flowi;
 static inline void
 nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
 {
 }
+
 #endif /*CONFIG_NETFILTER*/
 
 #if IS_ENABLED(CONFIG_NF_CONNTRACK)
@@ -440,6 +443,8 @@ static inline bool nf_ct_get_tuple_skb(struct nf_conntrack_tuple *dst_tuple,
 }
 #endif
 
+#ifdef CONFIG_NETFILTER
+
 struct nf_conn;
 enum ip_conntrack_info;
 
@@ -486,4 +491,6 @@ struct nf_bridge_frag_data {
 	__be16  vlan_proto;
 };
 
+#endif /* CONFIG_NETFILTER */
+
 #endif /*__LINUX_NETFILTER_H*/
-- 
2.23.0.rc1




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux