netfilter: add missing includes to a number of header-files.
authorJeremy Sowden <jeremy@azazel.net>
Wed, 7 Aug 2019 14:16:59 +0000 (15:16 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 13 Aug 2019 10:14:39 +0000 (12:14 +0200)
A number of netfilter header-files used declarations and definitions
from other headers without including them.  Added include directives to
make those declarations and definitions available.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
27 files changed:
include/linux/netfilter/ipset/ip_set_getport.h
include/linux/netfilter/nf_conntrack_amanda.h
include/linux/netfilter/nf_conntrack_ftp.h
include/linux/netfilter/nf_conntrack_h323.h
include/linux/netfilter/nf_conntrack_h323_asn1.h
include/linux/netfilter/nf_conntrack_irc.h
include/linux/netfilter/nf_conntrack_pptp.h
include/linux/netfilter/nf_conntrack_sip.h
include/linux/netfilter/nf_conntrack_snmp.h
include/linux/netfilter/nf_conntrack_tftp.h
include/net/netfilter/br_netfilter.h
include/net/netfilter/ipv4/nf_dup_ipv4.h
include/net/netfilter/ipv6/nf_defrag_ipv6.h
include/net/netfilter/ipv6/nf_dup_ipv6.h
include/net/netfilter/nf_conntrack_bridge.h
include/net/netfilter/nf_conntrack_count.h
include/net/netfilter/nf_dup_netdev.h
include/net/netfilter/nf_flow_table.h
include/net/netfilter/nf_nat_helper.h
include/net/netfilter/nf_nat_redirect.h
include/net/netfilter/nf_queue.h
include/net/netfilter/nf_reject.h
include/net/netfilter/nf_tables_ipv6.h
include/net/netfilter/nft_fib.h
include/net/netfilter/nft_meta.h
include/net/netfilter/nft_reject.h
include/uapi/linux/netfilter/xt_policy.h

index ac6a11d38a190c43abd3b5ef6f1568dbddaa0c84..a906df06948b0c120deafeff8215e3501d40c8be 100644 (file)
@@ -2,6 +2,10 @@
 #ifndef _IP_SET_GETPORT_H
 #define _IP_SET_GETPORT_H
 
+#include <linux/skbuff.h>
+#include <linux/types.h>
+#include <uapi/linux/in.h>
+
 extern bool ip_set_get_ip4_port(const struct sk_buff *skb, bool src,
                                __be16 *port, u8 *proto);
 
index 34345e543ba290851bada958e3b0f4f909d4d00b..6f0ac896fcc9730fcceb8ae880f09a121770274c 100644 (file)
@@ -3,6 +3,10 @@
 #define _NF_CONNTRACK_AMANDA_H
 /* AMANDA tracking. */
 
+#include <linux/netfilter.h>
+#include <linux/skbuff.h>
+#include <net/netfilter/nf_conntrack_expect.h>
+
 extern unsigned int (*nf_nat_amanda_hook)(struct sk_buff *skb,
                                          enum ip_conntrack_info ctinfo,
                                          unsigned int protoff,
index 73a296dfd019a287a3b240b4877a17f49eb9ed3c..0e38302820b9ea8183f3eefa456716dbc90a985a 100644 (file)
@@ -2,8 +2,12 @@
 #ifndef _NF_CONNTRACK_FTP_H
 #define _NF_CONNTRACK_FTP_H
 
+#include <linux/netfilter.h>
+#include <linux/skbuff.h>
+#include <linux/types.h>
+#include <net/netfilter/nf_conntrack_expect.h>
 #include <uapi/linux/netfilter/nf_conntrack_ftp.h>
-
+#include <uapi/linux/netfilter/nf_conntrack_tuple_common.h>
 
 #define FTP_PORT       21
 
@@ -20,8 +24,6 @@ struct nf_ct_ftp_master {
        u_int16_t flags[IP_CT_DIR_MAX];
 };
 
-struct nf_conntrack_expect;
-
 /* For NAT to hook in when we find a packet which describes what other
  * connection we should expect. */
 extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
index f76ed373a2a53a56dc8b61747f4a7a214298e314..96dfa886f8c0099816a21a285dffc189e7923ffc 100644 (file)
@@ -4,7 +4,12 @@
 
 #ifdef __KERNEL__
 
+#include <linux/netfilter.h>
+#include <linux/skbuff.h>
+#include <linux/types.h>
 #include <linux/netfilter/nf_conntrack_h323_asn1.h>
+#include <net/netfilter/nf_conntrack_expect.h>
+#include <uapi/linux/netfilter/nf_conntrack_tuple_common.h>
 
 #define RAS_PORT 1719
 #define Q931_PORT 1720
@@ -28,8 +33,6 @@ struct nf_ct_h323_master {
        };
 };
 
-struct nf_conn;
-
 int get_h225_addr(struct nf_conn *ct, unsigned char *data,
                  TransportAddress *taddr, union nf_inet_addr *addr,
                  __be16 *port);
index 19df78341fb32bb6e69628a111c16661644f6d94..bd6797f823b27f3b041d34e7a7bd00eded5ae7f8 100644 (file)
@@ -37,6 +37,8 @@
 /*****************************************************************************
  * H.323 Types
  ****************************************************************************/
+
+#include <linux/types.h>
 #include <linux/netfilter/nf_conntrack_h323_types.h>
 
 typedef struct {
index 00c2b74206e14f3c42570ce355088f929b86adb8..f75e005db969fc5c36cfdfb32d6ce21bee4fa590 100644 (file)
@@ -4,6 +4,10 @@
 
 #ifdef __KERNEL__
 
+#include <linux/netfilter.h>
+#include <linux/skbuff.h>
+#include <net/netfilter/nf_conntrack_expect.h>
+
 #define IRC_PORT       6667
 
 extern unsigned int (*nf_nat_irc_hook)(struct sk_buff *skb,
index 833a5b2255ea4d84f324ed8f28f0e73bee9f9c82..3f10e806f0dc507c3441bc862ff11295461edcda 100644 (file)
@@ -3,7 +3,12 @@
 #ifndef _NF_CONNTRACK_PPTP_H
 #define _NF_CONNTRACK_PPTP_H
 
+#include <linux/netfilter.h>
+#include <linux/skbuff.h>
+#include <linux/types.h>
 #include <linux/netfilter/nf_conntrack_common.h>
+#include <net/netfilter/nf_conntrack_expect.h>
+#include <uapi/linux/netfilter/nf_conntrack_tuple_common.h>
 
 extern const char *const pptp_msg_name[];
 
@@ -297,10 +302,6 @@ union pptp_ctrl_union {
        struct PptpSetLinkInfo          setlink;
 };
 
-/* crap needed for nf_conntrack_compat.h */
-struct nf_conn;
-struct nf_conntrack_expect;
-
 extern int
 (*nf_nat_pptp_hook_outbound)(struct sk_buff *skb,
                             struct nf_conn *ct, enum ip_conntrack_info ctinfo,
index c7fc38807a3304002b1f6179ef5ea840dc7e464e..f6437f7841af2535685fc43c65e56dd2b433fc8a 100644 (file)
@@ -3,9 +3,9 @@
 #define __NF_CONNTRACK_SIP_H__
 #ifdef __KERNEL__
 
-#include <net/netfilter/nf_conntrack_expect.h>
-
+#include <linux/skbuff.h>
 #include <linux/types.h>
+#include <net/netfilter/nf_conntrack_expect.h>
 
 #define SIP_PORT       5060
 #define SIP_TIMEOUT    3600
index 818088c474758627c60f82a24b67a7381a377ac3..87e4f33eb55fa11413dee3aac8512fc6352d4e03 100644 (file)
@@ -2,6 +2,9 @@
 #ifndef _NF_CONNTRACK_SNMP_H
 #define _NF_CONNTRACK_SNMP_H
 
+#include <linux/netfilter.h>
+#include <linux/skbuff.h>
+
 extern int (*nf_nat_snmp_hook)(struct sk_buff *skb,
                                unsigned int protoff,
                                struct nf_conn *ct,
index 5769e12dd0a2abdfdc89c189b23217fe6a6e3ab0..dc4c1b9beac0c63b7799255a19383a356732c7f9 100644 (file)
@@ -4,6 +4,11 @@
 
 #define TFTP_PORT 69
 
+#include <linux/netfilter.h>
+#include <linux/skbuff.h>
+#include <linux/types.h>
+#include <net/netfilter/nf_conntrack_expect.h>
+
 struct tftphdr {
        __be16 opcode;
 };
index 302fcd3aade2178b75be742e646c0f6016421d59..ca121ed906df22c430cbb7f3080564a3ba1758f4 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _BR_NETFILTER_H_
 #define _BR_NETFILTER_H_
 
+#include <linux/netfilter.h>
+
 #include "../../../net/bridge/br_private.h"
 
 static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb)
index c962e0be3549003aa37e578cac8fd6319088a189..a2bc16cdbcd3905801d11975e3c9bce51d54032b 100644 (file)
@@ -2,6 +2,9 @@
 #ifndef _NF_DUP_IPV4_H_
 #define _NF_DUP_IPV4_H_
 
+#include <linux/skbuff.h>
+#include <uapi/linux/in.h>
+
 void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum,
                 const struct in_addr *gw, int oif);
 
index 9d7e28736da9381b41e088e45097e220593fc877..6d31cd04114345085af1e9341b6c0f6f4ce4a289 100644 (file)
@@ -2,7 +2,9 @@
 #ifndef _NF_DEFRAG_IPV6_H
 #define _NF_DEFRAG_IPV6_H
 
-struct net;
+#include <linux/skbuff.h>
+#include <linux/types.h>
+
 int nf_defrag_ipv6_enable(struct net *);
 
 int nf_ct_frag6_init(void);
index caf0c2dd8ee701876fe1c9d279271f9fef5bc215..f6312bb04a132b9bc38472f6386c14a0a6f2411c 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _NF_DUP_IPV6_H_
 #define _NF_DUP_IPV6_H_
 
+#include <linux/skbuff.h>
+
 void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum,
                 const struct in6_addr *gw, int oif);
 
index 9a5514d5bc51f2dcb51b4732999fa24646bdaff8..8f2e5b2ab5238e0c878f04d7cbb673e0ac84e84a 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef NF_CONNTRACK_BRIDGE_
 #define NF_CONNTRACK_BRIDGE_
 
+#include <linux/module.h>
+#include <linux/types.h>
+#include <uapi/linux/if_ether.h>
+
 struct nf_ct_bridge_info {
        struct nf_hook_ops      *ops;
        unsigned int            ops_size;
index f32fc8289473200138803ac2c292df643633e102..9645b47fa7e415e2d7a74993104594daaee71093 100644 (file)
@@ -2,6 +2,9 @@
 #define _NF_CONNTRACK_COUNT_H
 
 #include <linux/list.h>
+#include <linux/spinlock.h>
+#include <net/netfilter/nf_conntrack_tuple.h>
+#include <net/netfilter/nf_conntrack_zones.h>
 
 struct nf_conncount_data;
 
index 2a6f6dcad3d927079563724f46a6700dc2e254a9..1816726721605a3f5a7bce270fb51ab5f483299e 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _NF_DUP_NETDEV_H_
 #define _NF_DUP_NETDEV_H_
 
+#include <net/netfilter/nf_tables.h>
+
 void nf_dup_netdev_egress(const struct nft_pktinfo *pkt, int oif);
 void nf_fwd_netdev_egress(const struct nft_pktinfo *pkt, int oif);
 
index d8c187936beca35298143ae8a942d4f7c4eb4061..7249e331bd0bf70d57c4fa1d8c5dd8f14819b91e 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/netdevice.h>
 #include <linux/rhashtable-types.h>
 #include <linux/rcupdate.h>
+#include <linux/netfilter.h>
 #include <linux/netfilter/nf_conntrack_tuple_common.h>
 #include <net/dst.h>
 
index 97d7033e93a4b29a07692f71d6db1302b29397a6..efae84646353ca272f4ef9f16382a2c82c939c0a 100644 (file)
@@ -3,9 +3,9 @@
 #define _NF_NAT_HELPER_H
 /* NAT protocol helper routines. */
 
+#include <linux/skbuff.h>
 #include <net/netfilter/nf_conntrack.h>
-
-struct sk_buff;
+#include <net/netfilter/nf_conntrack_expect.h>
 
 /* These return true or false. */
 bool __nf_nat_mangle_tcp_packet(struct sk_buff *skb, struct nf_conn *ct,
index c129aacc8ae8f9c77c323df5b58ecc499d416e12..2418653a66db11f087e3411ec5b42b1c56038b20 100644 (file)
@@ -2,6 +2,9 @@
 #ifndef _NF_NAT_REDIRECT_H_
 #define _NF_NAT_REDIRECT_H_
 
+#include <linux/skbuff.h>
+#include <uapi/linux/netfilter/nf_nat.h>
+
 unsigned int
 nf_nat_redirect_ipv4(struct sk_buff *skb,
                     const struct nf_nat_ipv4_multi_range_compat *mr,
index 3cb6dcf53a4e2aa74e7257a241065abb789f9162..359b80b43169ea76accb9bfd742a69de1dd3068e 100644 (file)
@@ -5,6 +5,8 @@
 #include <linux/ip.h>
 #include <linux/ipv6.h>
 #include <linux/jhash.h>
+#include <linux/netfilter.h>
+#include <linux/skbuff.h>
 
 /* Each queued (to userspace) skbuff has one of these. */
 struct nf_queue_entry {
index 221f877f29d1df280c66adb6d3a20e52ad45fab8..9051c3a0c8e77ce156a2c0f83fbbf369dd72e54b 100644 (file)
@@ -2,6 +2,9 @@
 #ifndef _NF_REJECT_H
 #define _NF_REJECT_H
 
+#include <linux/types.h>
+#include <uapi/linux/in.h>
+
 static inline bool nf_reject_verify_csum(__u8 proto)
 {
        /* Skip protocols that don't use 16-bit one's complement checksum
index dabe6fdb553a31d58f3fd4a7405b25411e7d0fb2..d0f1c537b01769209c899fb16fc21ad612bdd172 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <linux/netfilter_ipv6/ip6_tables.h>
 #include <net/ipv6.h>
+#include <net/netfilter/nf_tables.h>
 
 static inline void nft_set_pktinfo_ipv6(struct nft_pktinfo *pkt,
                                        struct sk_buff *skb)
index e4c4d8eaca8ca6e8a5c2c157a0da6e116eda1b66..628b6fa579cd889c681a1d68255d1ac106b17349 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _NFT_FIB_H_
 #define _NFT_FIB_H_
 
+#include <net/netfilter/nf_tables.h>
+
 struct nft_fib {
        enum nft_registers      dreg:8;
        u8                      result;
index 5c69e9b0938879a59b37c4438384371b51a03ef4..07e2fd507963a20ab7b4cc8ab734807e79cb370d 100644 (file)
@@ -2,6 +2,8 @@
 #ifndef _NFT_META_H_
 #define _NFT_META_H_
 
+#include <net/netfilter/nf_tables.h>
+
 struct nft_meta {
        enum nft_meta_keys      key:8;
        union {
index de80c50761f0fa8620980f23be669c58b3f1cf41..56b123a42220e01b0aaec1ed100d0d3f00230751 100644 (file)
@@ -2,6 +2,11 @@
 #ifndef _NFT_REJECT_H_
 #define _NFT_REJECT_H_
 
+#include <linux/types.h>
+#include <net/netlink.h>
+#include <net/netfilter/nf_tables.h>
+#include <uapi/linux/netfilter/nf_tables.h>
+
 struct nft_reject {
        enum nft_reject_types   type:8;
        u8                      icmp_code;
index 323bfa3074c59a3e33940be9dd5c8dddc0adbefa..4cf2ce2a8a4440109a96f0aaadfc74cedb8827cd 100644 (file)
@@ -2,6 +2,7 @@
 #ifndef _XT_POLICY_H
 #define _XT_POLICY_H
 
+#include <linux/netfilter.h>
 #include <linux/types.h>
 #include <linux/in.h>
 #include <linux/in6.h>