aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-12-05 23:56:46 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-05 23:56:46 -0500
commit244ebd9f8fa8beb7b37bdeebd6c5308b61f98aef (patch)
tree8b0a72056747f0bb9232fdafb480b0501dc83734 /include
parentddd5c50f9bec7ffab5d28c5dd244db8a4c3f27e7 (diff)
parentcac3763967362ace7996532ad3933f493a928a1b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following batch contains netfilter updates for net-next. Basically, enhancements for xt_recent, skip zeroing of timer in conntrack, fix linking problem with recent redirect support for nf_tables, ipset updates and a couple of cleanups. More specifically, they are: 1) Rise maximum number per IP address to be remembered in xt_recent while retaining backward compatibility, from Florian Westphal. 2) Skip zeroing timer area in nf_conn objects, also from Florian. 3) Inspect IPv4 and IPv6 traffic from the bridge to allow filtering using using meta l4proto and transport layer header, from Alvaro Neira. 4) Fix linking problems in the new redirect support when CONFIG_IPV6=n and IP6_NF_IPTABLES=n. And ipset updates from Jozsef Kadlecsik: 5) Support updating element extensions when the set is full (fixes netfilter bugzilla id 880). 6) Fix set match with 32-bits userspace / 64-bits kernel. 7) Indicate explicitly when /0 networks are supported in ipset. 8) Simplify cidr handling for hash:*net* types. 9) Allocate the proper size of memory when /0 networks are supported. 10) Explicitly add padding elements to hash:net,net and hash:net,port, because the elements must be u32 sized for the used hash function. Jozsef is also cooking ipset RCU conversion which should land soon if they reach the merge window in time. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/netfilter/ipv4/nf_nat_redirect.h9
-rw-r--r--include/net/netfilter/ipv6/nf_nat_redirect.h8
-rw-r--r--include/net/netfilter/nf_conntrack.h15
-rw-r--r--include/net/netfilter/nf_nat_redirect.h12
-rw-r--r--include/net/netfilter/nf_tables_bridge.h7
-rw-r--r--include/uapi/linux/netfilter/ipset/ip_set.h8
-rw-r--r--include/uapi/linux/netfilter/xt_set.h13
7 files changed, 46 insertions, 26 deletions
diff --git a/include/net/netfilter/ipv4/nf_nat_redirect.h b/include/net/netfilter/ipv4/nf_nat_redirect.h
deleted file mode 100644
index 19e1df3a0a4d..000000000000
--- a/include/net/netfilter/ipv4/nf_nat_redirect.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef _NF_NAT_REDIRECT_IPV4_H_
2#define _NF_NAT_REDIRECT_IPV4_H_
3
4unsigned int
5nf_nat_redirect_ipv4(struct sk_buff *skb,
6 const struct nf_nat_ipv4_multi_range_compat *mr,
7 unsigned int hooknum);
8
9#endif /* _NF_NAT_REDIRECT_IPV4_H_ */
diff --git a/include/net/netfilter/ipv6/nf_nat_redirect.h b/include/net/netfilter/ipv6/nf_nat_redirect.h
deleted file mode 100644
index 1ebdffc461cc..000000000000
--- a/include/net/netfilter/ipv6/nf_nat_redirect.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _NF_NAT_REDIRECT_IPV6_H_
2#define _NF_NAT_REDIRECT_IPV6_H_
3
4unsigned int
5nf_nat_redirect_ipv6(struct sk_buff *skb, const struct nf_nat_range *range,
6 unsigned int hooknum);
7
8#endif /* _NF_NAT_REDIRECT_IPV6_H_ */
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index c8a7db605e03..f0daed2b54d1 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -92,12 +92,18 @@ struct nf_conn {
92 /* Have we seen traffic both ways yet? (bitset) */ 92 /* Have we seen traffic both ways yet? (bitset) */
93 unsigned long status; 93 unsigned long status;
94 94
95 /* If we were expected by an expectation, this will be it */
96 struct nf_conn *master;
97
98 /* Timer function; drops refcnt when it goes off. */ 95 /* Timer function; drops refcnt when it goes off. */
99 struct timer_list timeout; 96 struct timer_list timeout;
100 97
98#ifdef CONFIG_NET_NS
99 struct net *ct_net;
100#endif
101 /* all members below initialized via memset */
102 u8 __nfct_init_offset[0];
103
104 /* If we were expected by an expectation, this will be it */
105 struct nf_conn *master;
106
101#if defined(CONFIG_NF_CONNTRACK_MARK) 107#if defined(CONFIG_NF_CONNTRACK_MARK)
102 u_int32_t mark; 108 u_int32_t mark;
103#endif 109#endif
@@ -108,9 +114,6 @@ struct nf_conn {
108 114
109 /* Extensions */ 115 /* Extensions */
110 struct nf_ct_ext *ext; 116 struct nf_ct_ext *ext;
111#ifdef CONFIG_NET_NS
112 struct net *ct_net;
113#endif
114 117
115 /* Storage reserved for other modules, must be the last member */ 118 /* Storage reserved for other modules, must be the last member */
116 union nf_conntrack_proto proto; 119 union nf_conntrack_proto proto;
diff --git a/include/net/netfilter/nf_nat_redirect.h b/include/net/netfilter/nf_nat_redirect.h
new file mode 100644
index 000000000000..73b729543309
--- /dev/null
+++ b/include/net/netfilter/nf_nat_redirect.h
@@ -0,0 +1,12 @@
1#ifndef _NF_NAT_REDIRECT_H_
2#define _NF_NAT_REDIRECT_H_
3
4unsigned int
5nf_nat_redirect_ipv4(struct sk_buff *skb,
6 const struct nf_nat_ipv4_multi_range_compat *mr,
7 unsigned int hooknum);
8unsigned int
9nf_nat_redirect_ipv6(struct sk_buff *skb, const struct nf_nat_range *range,
10 unsigned int hooknum);
11
12#endif /* _NF_NAT_REDIRECT_H_ */
diff --git a/include/net/netfilter/nf_tables_bridge.h b/include/net/netfilter/nf_tables_bridge.h
new file mode 100644
index 000000000000..511fb79f6dad
--- /dev/null
+++ b/include/net/netfilter/nf_tables_bridge.h
@@ -0,0 +1,7 @@
1#ifndef _NET_NF_TABLES_BRIDGE_H
2#define _NET_NF_TABLES_BRIDGE_H
3
4int nft_bridge_iphdr_validate(struct sk_buff *skb);
5int nft_bridge_ip6hdr_validate(struct sk_buff *skb);
6
7#endif /* _NET_NF_TABLES_BRIDGE_H */
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h
index ca03119111a2..5ab4e60894cf 100644
--- a/include/uapi/linux/netfilter/ipset/ip_set.h
+++ b/include/uapi/linux/netfilter/ipset/ip_set.h
@@ -256,11 +256,17 @@ enum {
256 IPSET_COUNTER_GT, 256 IPSET_COUNTER_GT,
257}; 257};
258 258
259struct ip_set_counter_match { 259/* Backward compatibility for set match v3 */
260struct ip_set_counter_match0 {
260 __u8 op; 261 __u8 op;
261 __u64 value; 262 __u64 value;
262}; 263};
263 264
265struct ip_set_counter_match {
266 __aligned_u64 value;
267 __u8 op;
268};
269
264/* Interface to iptables/ip6tables */ 270/* Interface to iptables/ip6tables */
265 271
266#define SO_IP_SET 83 272#define SO_IP_SET 83
diff --git a/include/uapi/linux/netfilter/xt_set.h b/include/uapi/linux/netfilter/xt_set.h
index d6a1df1f2947..d4e02348384c 100644
--- a/include/uapi/linux/netfilter/xt_set.h
+++ b/include/uapi/linux/netfilter/xt_set.h
@@ -66,8 +66,8 @@ struct xt_set_info_target_v2 {
66 66
67struct xt_set_info_match_v3 { 67struct xt_set_info_match_v3 {
68 struct xt_set_info match_set; 68 struct xt_set_info match_set;
69 struct ip_set_counter_match packets; 69 struct ip_set_counter_match0 packets;
70 struct ip_set_counter_match bytes; 70 struct ip_set_counter_match0 bytes;
71 __u32 flags; 71 __u32 flags;
72}; 72};
73 73
@@ -81,4 +81,13 @@ struct xt_set_info_target_v3 {
81 __u32 timeout; 81 __u32 timeout;
82}; 82};
83 83
84/* Revision 4 match */
85
86struct xt_set_info_match_v4 {
87 struct xt_set_info match_set;
88 struct ip_set_counter_match packets;
89 struct ip_set_counter_match bytes;
90 __u32 flags;
91};
92
84#endif /*_XT_SET_H*/ 93#endif /*_XT_SET_H*/