Commit a1b2f04e authored by Jeremy Sowden's avatar Jeremy Sowden Committed by Pablo Neira Ayuso

netfilter: add missing includes to a number of header-files.

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: default avatarJeremy Sowden <jeremy@azazel.net>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent bd96b4c7
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
#ifndef _IP_SET_GETPORT_H #ifndef _IP_SET_GETPORT_H
#define _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, extern bool ip_set_get_ip4_port(const struct sk_buff *skb, bool src,
__be16 *port, u8 *proto); __be16 *port, u8 *proto);
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
#define _NF_CONNTRACK_AMANDA_H #define _NF_CONNTRACK_AMANDA_H
/* AMANDA tracking. */ /* 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, extern unsigned int (*nf_nat_amanda_hook)(struct sk_buff *skb,
enum ip_conntrack_info ctinfo, enum ip_conntrack_info ctinfo,
unsigned int protoff, unsigned int protoff,
......
...@@ -2,8 +2,12 @@ ...@@ -2,8 +2,12 @@
#ifndef _NF_CONNTRACK_FTP_H #ifndef _NF_CONNTRACK_FTP_H
#define _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_ftp.h>
#include <uapi/linux/netfilter/nf_conntrack_tuple_common.h>
#define FTP_PORT 21 #define FTP_PORT 21
...@@ -20,8 +24,6 @@ struct nf_ct_ftp_master { ...@@ -20,8 +24,6 @@ struct nf_ct_ftp_master {
u_int16_t flags[IP_CT_DIR_MAX]; 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 /* For NAT to hook in when we find a packet which describes what other
* connection we should expect. */ * connection we should expect. */
extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb, extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
......
...@@ -4,7 +4,12 @@ ...@@ -4,7 +4,12 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/netfilter.h>
#include <linux/skbuff.h>
#include <linux/types.h>
#include <linux/netfilter/nf_conntrack_h323_asn1.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 RAS_PORT 1719
#define Q931_PORT 1720 #define Q931_PORT 1720
...@@ -28,8 +33,6 @@ struct nf_ct_h323_master { ...@@ -28,8 +33,6 @@ struct nf_ct_h323_master {
}; };
}; };
struct nf_conn;
int get_h225_addr(struct nf_conn *ct, unsigned char *data, int get_h225_addr(struct nf_conn *ct, unsigned char *data,
TransportAddress *taddr, union nf_inet_addr *addr, TransportAddress *taddr, union nf_inet_addr *addr,
__be16 *port); __be16 *port);
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
/***************************************************************************** /*****************************************************************************
* H.323 Types * H.323 Types
****************************************************************************/ ****************************************************************************/
#include <linux/types.h>
#include <linux/netfilter/nf_conntrack_h323_types.h> #include <linux/netfilter/nf_conntrack_h323_types.h>
typedef struct { typedef struct {
......
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/netfilter.h>
#include <linux/skbuff.h>
#include <net/netfilter/nf_conntrack_expect.h>
#define IRC_PORT 6667 #define IRC_PORT 6667
extern unsigned int (*nf_nat_irc_hook)(struct sk_buff *skb, extern unsigned int (*nf_nat_irc_hook)(struct sk_buff *skb,
......
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
#ifndef _NF_CONNTRACK_PPTP_H #ifndef _NF_CONNTRACK_PPTP_H
#define _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 <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[]; extern const char *const pptp_msg_name[];
...@@ -297,10 +302,6 @@ union pptp_ctrl_union { ...@@ -297,10 +302,6 @@ union pptp_ctrl_union {
struct PptpSetLinkInfo setlink; struct PptpSetLinkInfo setlink;
}; };
/* crap needed for nf_conntrack_compat.h */
struct nf_conn;
struct nf_conntrack_expect;
extern int extern int
(*nf_nat_pptp_hook_outbound)(struct sk_buff *skb, (*nf_nat_pptp_hook_outbound)(struct sk_buff *skb,
struct nf_conn *ct, enum ip_conntrack_info ctinfo, struct nf_conn *ct, enum ip_conntrack_info ctinfo,
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
#define __NF_CONNTRACK_SIP_H__ #define __NF_CONNTRACK_SIP_H__
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <net/netfilter/nf_conntrack_expect.h> #include <linux/skbuff.h>
#include <linux/types.h> #include <linux/types.h>
#include <net/netfilter/nf_conntrack_expect.h>
#define SIP_PORT 5060 #define SIP_PORT 5060
#define SIP_TIMEOUT 3600 #define SIP_TIMEOUT 3600
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
#ifndef _NF_CONNTRACK_SNMP_H #ifndef _NF_CONNTRACK_SNMP_H
#define _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, extern int (*nf_nat_snmp_hook)(struct sk_buff *skb,
unsigned int protoff, unsigned int protoff,
struct nf_conn *ct, struct nf_conn *ct,
......
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
#define TFTP_PORT 69 #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 { struct tftphdr {
__be16 opcode; __be16 opcode;
}; };
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#ifndef _BR_NETFILTER_H_ #ifndef _BR_NETFILTER_H_
#define _BR_NETFILTER_H_ #define _BR_NETFILTER_H_
#include <linux/netfilter.h>
#include "../../../net/bridge/br_private.h" #include "../../../net/bridge/br_private.h"
static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb) static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb)
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
#ifndef _NF_DUP_IPV4_H_ #ifndef _NF_DUP_IPV4_H_
#define _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, void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum,
const struct in_addr *gw, int oif); const struct in_addr *gw, int oif);
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
#ifndef _NF_DEFRAG_IPV6_H #ifndef _NF_DEFRAG_IPV6_H
#define _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_defrag_ipv6_enable(struct net *);
int nf_ct_frag6_init(void); int nf_ct_frag6_init(void);
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#ifndef _NF_DUP_IPV6_H_ #ifndef _NF_DUP_IPV6_H_
#define _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, void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum,
const struct in6_addr *gw, int oif); const struct in6_addr *gw, int oif);
......
#ifndef NF_CONNTRACK_BRIDGE_ #ifndef NF_CONNTRACK_BRIDGE_
#define 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_ct_bridge_info {
struct nf_hook_ops *ops; struct nf_hook_ops *ops;
unsigned int ops_size; unsigned int ops_size;
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
#define _NF_CONNTRACK_COUNT_H #define _NF_CONNTRACK_COUNT_H
#include <linux/list.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; struct nf_conncount_data;
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#ifndef _NF_DUP_NETDEV_H_ #ifndef _NF_DUP_NETDEV_H_
#define _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_dup_netdev_egress(const struct nft_pktinfo *pkt, int oif);
void nf_fwd_netdev_egress(const struct nft_pktinfo *pkt, int oif); void nf_fwd_netdev_egress(const struct nft_pktinfo *pkt, int oif);
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/rhashtable-types.h> #include <linux/rhashtable-types.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/netfilter.h>
#include <linux/netfilter/nf_conntrack_tuple_common.h> #include <linux/netfilter/nf_conntrack_tuple_common.h>
#include <net/dst.h> #include <net/dst.h>
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
#define _NF_NAT_HELPER_H #define _NF_NAT_HELPER_H
/* NAT protocol helper routines. */ /* NAT protocol helper routines. */
#include <linux/skbuff.h>
#include <net/netfilter/nf_conntrack.h> #include <net/netfilter/nf_conntrack.h>
#include <net/netfilter/nf_conntrack_expect.h>
struct sk_buff;
/* These return true or false. */ /* These return true or false. */
bool __nf_nat_mangle_tcp_packet(struct sk_buff *skb, struct nf_conn *ct, bool __nf_nat_mangle_tcp_packet(struct sk_buff *skb, struct nf_conn *ct,
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
#ifndef _NF_NAT_REDIRECT_H_ #ifndef _NF_NAT_REDIRECT_H_
#define _NF_NAT_REDIRECT_H_ #define _NF_NAT_REDIRECT_H_
#include <linux/skbuff.h>
#include <uapi/linux/netfilter/nf_nat.h>
unsigned int unsigned int
nf_nat_redirect_ipv4(struct sk_buff *skb, nf_nat_redirect_ipv4(struct sk_buff *skb,
const struct nf_nat_ipv4_multi_range_compat *mr, const struct nf_nat_ipv4_multi_range_compat *mr,
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/ipv6.h> #include <linux/ipv6.h>
#include <linux/jhash.h> #include <linux/jhash.h>
#include <linux/netfilter.h>
#include <linux/skbuff.h>
/* Each queued (to userspace) skbuff has one of these. */ /* Each queued (to userspace) skbuff has one of these. */
struct nf_queue_entry { struct nf_queue_entry {
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
#ifndef _NF_REJECT_H #ifndef _NF_REJECT_H
#define _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) static inline bool nf_reject_verify_csum(__u8 proto)
{ {
/* Skip protocols that don't use 16-bit one's complement checksum /* Skip protocols that don't use 16-bit one's complement checksum
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <linux/netfilter_ipv6/ip6_tables.h> #include <linux/netfilter_ipv6/ip6_tables.h>
#include <net/ipv6.h> #include <net/ipv6.h>
#include <net/netfilter/nf_tables.h>
static inline void nft_set_pktinfo_ipv6(struct nft_pktinfo *pkt, static inline void nft_set_pktinfo_ipv6(struct nft_pktinfo *pkt,
struct sk_buff *skb) struct sk_buff *skb)
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#ifndef _NFT_FIB_H_ #ifndef _NFT_FIB_H_
#define _NFT_FIB_H_ #define _NFT_FIB_H_
#include <net/netfilter/nf_tables.h>
struct nft_fib { struct nft_fib {
enum nft_registers dreg:8; enum nft_registers dreg:8;
u8 result; u8 result;
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#ifndef _NFT_META_H_ #ifndef _NFT_META_H_
#define _NFT_META_H_ #define _NFT_META_H_
#include <net/netfilter/nf_tables.h>
struct nft_meta { struct nft_meta {
enum nft_meta_keys key:8; enum nft_meta_keys key:8;
union { union {
......
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
#ifndef _NFT_REJECT_H_ #ifndef _NFT_REJECT_H_
#define _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 { struct nft_reject {
enum nft_reject_types type:8; enum nft_reject_types type:8;
u8 icmp_code; u8 icmp_code;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#ifndef _XT_POLICY_H #ifndef _XT_POLICY_H
#define _XT_POLICY_H #define _XT_POLICY_H
#include <linux/netfilter.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/in.h> #include <linux/in.h>
#include <linux/in6.h> #include <linux/in6.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment