aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_connlimit.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-02-15 18:13:33 +0100
committerPatrick McHardy <kaber@trash.net>2010-02-15 18:13:33 +0100
commit5d0aa2ccd4699a01cfdf14886191c249d7b45a01 (patch)
tree6ea81b5eede26bd6a04bcc3cd79770c334139381 /net/netfilter/xt_connlimit.c
parent8fea97ec1772bbf553d89187340ef624d548e115 (diff)
downloadkernel_samsung_smdk4412-5d0aa2ccd4699a01cfdf14886191c249d7b45a01.zip
kernel_samsung_smdk4412-5d0aa2ccd4699a01cfdf14886191c249d7b45a01.tar.gz
kernel_samsung_smdk4412-5d0aa2ccd4699a01cfdf14886191c249d7b45a01.tar.bz2
netfilter: nf_conntrack: add support for "conntrack zones"
Normally, each connection needs a unique identity. Conntrack zones allow to specify a numerical zone using the CT target, connections in different zones can use the same identity. Example: iptables -t raw -A PREROUTING -i veth0 -j CT --zone 1 iptables -t raw -A OUTPUT -o veth1 -j CT --zone 1 Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/xt_connlimit.c')
-rw-r--r--net/netfilter/xt_connlimit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 0d9d18e..26997ce 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -28,6 +28,7 @@
#include <net/netfilter/nf_conntrack.h>
#include <net/netfilter/nf_conntrack_core.h>
#include <net/netfilter/nf_conntrack_tuple.h>
+#include <net/netfilter/nf_conntrack_zones.h>
/* we will save the tuples of all connections we care about */
struct xt_connlimit_conn {
@@ -114,7 +115,8 @@ static int count_them(struct net *net,
/* check the saved connections */
list_for_each_entry_safe(conn, tmp, hash, list) {
- found = nf_conntrack_find_get(net, &conn->tuple);
+ found = nf_conntrack_find_get(net, NF_CT_DEFAULT_ZONE,
+ &conn->tuple);
found_ct = NULL;
if (found != NULL)