diff options
author | David S. Miller <davem@davemloft.net> | 2010-08-02 18:07:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-02 18:07:58 -0400 |
commit | 83bf2e4089bebc2c7fd14a79de5954b26fe8d4af (patch) | |
tree | ab2cb1f229ba4c2d7236406c997e41a223daf74d /include | |
parent | de38483010bae523f533bb6bf9f7b7353772f6eb (diff) | |
parent | 6661481d5a8975657742c7ed40ae16bdaa7d0a6e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/Kbuild | 5 | ||||
-rw-r--r-- | include/linux/netfilter/nfnetlink_log.h | 2 | ||||
-rw-r--r-- | include/linux/netfilter/xt_CHECKSUM.h | 20 | ||||
-rw-r--r-- | include/linux/netfilter/xt_cpu.h | 11 | ||||
-rw-r--r-- | include/linux/netfilter/xt_ipvs.h | 27 | ||||
-rw-r--r-- | include/linux/netfilter/xt_quota.h | 2 | ||||
-rw-r--r-- | include/net/ip_vs.h | 14 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_extend.h | 9 | ||||
-rw-r--r-- | include/net/netfilter/nf_nat_protocol.h | 8 | ||||
-rw-r--r-- | include/net/netfilter/nfnetlink_log.h | 2 |
10 files changed, 89 insertions, 11 deletions
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index bb103f43afa0..edeeabdc1500 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
@@ -3,6 +3,7 @@ header-y += nf_conntrack_tuple_common.h | |||
3 | header-y += nfnetlink_conntrack.h | 3 | header-y += nfnetlink_conntrack.h |
4 | header-y += nfnetlink_log.h | 4 | header-y += nfnetlink_log.h |
5 | header-y += nfnetlink_queue.h | 5 | header-y += nfnetlink_queue.h |
6 | header-y += xt_CHECKSUM.h | ||
6 | header-y += xt_CLASSIFY.h | 7 | header-y += xt_CLASSIFY.h |
7 | header-y += xt_CONNMARK.h | 8 | header-y += xt_CONNMARK.h |
8 | header-y += xt_CONNSECMARK.h | 9 | header-y += xt_CONNSECMARK.h |
@@ -19,17 +20,19 @@ header-y += xt_TCPMSS.h | |||
19 | header-y += xt_TCPOPTSTRIP.h | 20 | header-y += xt_TCPOPTSTRIP.h |
20 | header-y += xt_TEE.h | 21 | header-y += xt_TEE.h |
21 | header-y += xt_TPROXY.h | 22 | header-y += xt_TPROXY.h |
23 | header-y += xt_cluster.h | ||
22 | header-y += xt_comment.h | 24 | header-y += xt_comment.h |
23 | header-y += xt_connbytes.h | 25 | header-y += xt_connbytes.h |
24 | header-y += xt_connlimit.h | 26 | header-y += xt_connlimit.h |
25 | header-y += xt_connmark.h | 27 | header-y += xt_connmark.h |
26 | header-y += xt_conntrack.h | 28 | header-y += xt_conntrack.h |
27 | header-y += xt_cluster.h | 29 | header-y += xt_cpu.h |
28 | header-y += xt_dccp.h | 30 | header-y += xt_dccp.h |
29 | header-y += xt_dscp.h | 31 | header-y += xt_dscp.h |
30 | header-y += xt_esp.h | 32 | header-y += xt_esp.h |
31 | header-y += xt_hashlimit.h | 33 | header-y += xt_hashlimit.h |
32 | header-y += xt_iprange.h | 34 | header-y += xt_iprange.h |
35 | header-y += xt_ipvs.h | ||
33 | header-y += xt_helper.h | 36 | header-y += xt_helper.h |
34 | header-y += xt_length.h | 37 | header-y += xt_length.h |
35 | header-y += xt_limit.h | 38 | header-y += xt_limit.h |
diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h index 1d0b84aa1d42..ea9b8d380527 100644 --- a/include/linux/netfilter/nfnetlink_log.h +++ b/include/linux/netfilter/nfnetlink_log.h | |||
@@ -89,7 +89,7 @@ enum nfulnl_attr_config { | |||
89 | #define NFULNL_COPY_NONE 0x00 | 89 | #define NFULNL_COPY_NONE 0x00 |
90 | #define NFULNL_COPY_META 0x01 | 90 | #define NFULNL_COPY_META 0x01 |
91 | #define NFULNL_COPY_PACKET 0x02 | 91 | #define NFULNL_COPY_PACKET 0x02 |
92 | #define NFULNL_COPY_DISABLED 0x03 | 92 | /* 0xff is reserved, don't use it for new copy modes. */ |
93 | 93 | ||
94 | #define NFULNL_CFG_F_SEQ 0x0001 | 94 | #define NFULNL_CFG_F_SEQ 0x0001 |
95 | #define NFULNL_CFG_F_SEQ_GLOBAL 0x0002 | 95 | #define NFULNL_CFG_F_SEQ_GLOBAL 0x0002 |
diff --git a/include/linux/netfilter/xt_CHECKSUM.h b/include/linux/netfilter/xt_CHECKSUM.h new file mode 100644 index 000000000000..9a2e4661654e --- /dev/null +++ b/include/linux/netfilter/xt_CHECKSUM.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* Header file for iptables ipt_CHECKSUM target | ||
2 | * | ||
3 | * (C) 2002 by Harald Welte <laforge@gnumonks.org> | ||
4 | * (C) 2010 Red Hat Inc | ||
5 | * Author: Michael S. Tsirkin <mst@redhat.com> | ||
6 | * | ||
7 | * This software is distributed under GNU GPL v2, 1991 | ||
8 | */ | ||
9 | #ifndef _XT_CHECKSUM_TARGET_H | ||
10 | #define _XT_CHECKSUM_TARGET_H | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | |||
14 | #define XT_CHECKSUM_OP_FILL 0x01 /* fill in checksum in IP header */ | ||
15 | |||
16 | struct xt_CHECKSUM_info { | ||
17 | __u8 operation; /* bitset of operations */ | ||
18 | }; | ||
19 | |||
20 | #endif /* _XT_CHECKSUM_TARGET_H */ | ||
diff --git a/include/linux/netfilter/xt_cpu.h b/include/linux/netfilter/xt_cpu.h new file mode 100644 index 000000000000..93c7f11d8f42 --- /dev/null +++ b/include/linux/netfilter/xt_cpu.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _XT_CPU_H | ||
2 | #define _XT_CPU_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct xt_cpu_info { | ||
7 | __u32 cpu; | ||
8 | __u32 invert; | ||
9 | }; | ||
10 | |||
11 | #endif /*_XT_CPU_H*/ | ||
diff --git a/include/linux/netfilter/xt_ipvs.h b/include/linux/netfilter/xt_ipvs.h new file mode 100644 index 000000000000..1167aeb7a347 --- /dev/null +++ b/include/linux/netfilter/xt_ipvs.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef _XT_IPVS_H | ||
2 | #define _XT_IPVS_H | ||
3 | |||
4 | enum { | ||
5 | XT_IPVS_IPVS_PROPERTY = 1 << 0, /* all other options imply this one */ | ||
6 | XT_IPVS_PROTO = 1 << 1, | ||
7 | XT_IPVS_VADDR = 1 << 2, | ||
8 | XT_IPVS_VPORT = 1 << 3, | ||
9 | XT_IPVS_DIR = 1 << 4, | ||
10 | XT_IPVS_METHOD = 1 << 5, | ||
11 | XT_IPVS_VPORTCTL = 1 << 6, | ||
12 | XT_IPVS_MASK = (1 << 7) - 1, | ||
13 | XT_IPVS_ONCE_MASK = XT_IPVS_MASK & ~XT_IPVS_IPVS_PROPERTY | ||
14 | }; | ||
15 | |||
16 | struct xt_ipvs_mtinfo { | ||
17 | union nf_inet_addr vaddr, vmask; | ||
18 | __be16 vport; | ||
19 | __u8 l4proto; | ||
20 | __u8 fwd_method; | ||
21 | __be16 vportctl; | ||
22 | |||
23 | __u8 invert; | ||
24 | __u8 bitmask; | ||
25 | }; | ||
26 | |||
27 | #endif /* _XT_IPVS_H */ | ||
diff --git a/include/linux/netfilter/xt_quota.h b/include/linux/netfilter/xt_quota.h index 8dc89dfc1361..b0d28c659ab7 100644 --- a/include/linux/netfilter/xt_quota.h +++ b/include/linux/netfilter/xt_quota.h | |||
@@ -11,9 +11,9 @@ struct xt_quota_priv; | |||
11 | struct xt_quota_info { | 11 | struct xt_quota_info { |
12 | u_int32_t flags; | 12 | u_int32_t flags; |
13 | u_int32_t pad; | 13 | u_int32_t pad; |
14 | aligned_u64 quota; | ||
14 | 15 | ||
15 | /* Used internally by the kernel */ | 16 | /* Used internally by the kernel */ |
16 | aligned_u64 quota; | ||
17 | struct xt_quota_priv *master; | 17 | struct xt_quota_priv *master; |
18 | }; | 18 | }; |
19 | 19 | ||
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index fe82b1e10a29..a4747a0f7303 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -632,10 +632,22 @@ extern struct ip_vs_conn *ip_vs_ct_in_get | |||
632 | (int af, int protocol, const union nf_inet_addr *s_addr, __be16 s_port, | 632 | (int af, int protocol, const union nf_inet_addr *s_addr, __be16 s_port, |
633 | const union nf_inet_addr *d_addr, __be16 d_port); | 633 | const union nf_inet_addr *d_addr, __be16 d_port); |
634 | 634 | ||
635 | struct ip_vs_conn * ip_vs_conn_in_get_proto(int af, const struct sk_buff *skb, | ||
636 | struct ip_vs_protocol *pp, | ||
637 | const struct ip_vs_iphdr *iph, | ||
638 | unsigned int proto_off, | ||
639 | int inverse); | ||
640 | |||
635 | extern struct ip_vs_conn *ip_vs_conn_out_get | 641 | extern struct ip_vs_conn *ip_vs_conn_out_get |
636 | (int af, int protocol, const union nf_inet_addr *s_addr, __be16 s_port, | 642 | (int af, int protocol, const union nf_inet_addr *s_addr, __be16 s_port, |
637 | const union nf_inet_addr *d_addr, __be16 d_port); | 643 | const union nf_inet_addr *d_addr, __be16 d_port); |
638 | 644 | ||
645 | struct ip_vs_conn * ip_vs_conn_out_get_proto(int af, const struct sk_buff *skb, | ||
646 | struct ip_vs_protocol *pp, | ||
647 | const struct ip_vs_iphdr *iph, | ||
648 | unsigned int proto_off, | ||
649 | int inverse); | ||
650 | |||
639 | /* put back the conn without restarting its timer */ | 651 | /* put back the conn without restarting its timer */ |
640 | static inline void __ip_vs_conn_put(struct ip_vs_conn *cp) | 652 | static inline void __ip_vs_conn_put(struct ip_vs_conn *cp) |
641 | { | 653 | { |
@@ -736,8 +748,6 @@ extern void ip_vs_app_inc_put(struct ip_vs_app *inc); | |||
736 | 748 | ||
737 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb); | 749 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb); |
738 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb); | 750 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb); |
739 | extern int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri, | ||
740 | char *o_buf, int o_len, char *n_buf, int n_len); | ||
741 | extern int ip_vs_app_init(void); | 751 | extern int ip_vs_app_init(void); |
742 | extern void ip_vs_app_cleanup(void); | 752 | extern void ip_vs_app_cleanup(void); |
743 | 753 | ||
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index 32d15bd6efa3..0772d296dfdb 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
@@ -28,9 +28,14 @@ struct nf_ct_ext { | |||
28 | char data[0]; | 28 | char data[0]; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | static inline int nf_ct_ext_exist(const struct nf_conn *ct, u8 id) | 31 | static inline bool __nf_ct_ext_exist(const struct nf_ct_ext *ext, u8 id) |
32 | { | 32 | { |
33 | return (ct->ext && ct->ext->offset[id]); | 33 | return !!ext->offset[id]; |
34 | } | ||
35 | |||
36 | static inline bool nf_ct_ext_exist(const struct nf_conn *ct, u8 id) | ||
37 | { | ||
38 | return (ct->ext && __nf_ct_ext_exist(ct->ext, id)); | ||
34 | } | 39 | } |
35 | 40 | ||
36 | static inline void *__nf_ct_ext_find(const struct nf_conn *ct, u8 id) | 41 | static inline void *__nf_ct_ext_find(const struct nf_conn *ct, u8 id) |
diff --git a/include/net/netfilter/nf_nat_protocol.h b/include/net/netfilter/nf_nat_protocol.h index c398017ccfa3..df17bac46bf5 100644 --- a/include/net/netfilter/nf_nat_protocol.h +++ b/include/net/netfilter/nf_nat_protocol.h | |||
@@ -27,9 +27,9 @@ struct nf_nat_protocol { | |||
27 | 27 | ||
28 | /* Alter the per-proto part of the tuple (depending on | 28 | /* Alter the per-proto part of the tuple (depending on |
29 | maniptype), to give a unique tuple in the given range if | 29 | maniptype), to give a unique tuple in the given range if |
30 | possible; return false if not. Per-protocol part of tuple | 30 | possible. Per-protocol part of tuple is initialized to the |
31 | is initialized to the incoming packet. */ | 31 | incoming packet. */ |
32 | bool (*unique_tuple)(struct nf_conntrack_tuple *tuple, | 32 | void (*unique_tuple)(struct nf_conntrack_tuple *tuple, |
33 | const struct nf_nat_range *range, | 33 | const struct nf_nat_range *range, |
34 | enum nf_nat_manip_type maniptype, | 34 | enum nf_nat_manip_type maniptype, |
35 | const struct nf_conn *ct); | 35 | const struct nf_conn *ct); |
@@ -63,7 +63,7 @@ extern bool nf_nat_proto_in_range(const struct nf_conntrack_tuple *tuple, | |||
63 | const union nf_conntrack_man_proto *min, | 63 | const union nf_conntrack_man_proto *min, |
64 | const union nf_conntrack_man_proto *max); | 64 | const union nf_conntrack_man_proto *max); |
65 | 65 | ||
66 | extern bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple, | 66 | extern void nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple, |
67 | const struct nf_nat_range *range, | 67 | const struct nf_nat_range *range, |
68 | enum nf_nat_manip_type maniptype, | 68 | enum nf_nat_manip_type maniptype, |
69 | const struct nf_conn *ct, | 69 | const struct nf_conn *ct, |
diff --git a/include/net/netfilter/nfnetlink_log.h b/include/net/netfilter/nfnetlink_log.h index b0569ff0775e..e2dec42c2db2 100644 --- a/include/net/netfilter/nfnetlink_log.h +++ b/include/net/netfilter/nfnetlink_log.h | |||
@@ -10,5 +10,7 @@ nfulnl_log_packet(u_int8_t pf, | |||
10 | const struct nf_loginfo *li_user, | 10 | const struct nf_loginfo *li_user, |
11 | const char *prefix); | 11 | const char *prefix); |
12 | 12 | ||
13 | #define NFULNL_COPY_DISABLED 0xff | ||
14 | |||
13 | #endif /* _KER_NFNETLINK_LOG_H */ | 15 | #endif /* _KER_NFNETLINK_LOG_H */ |
14 | 16 | ||