summaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_connlimit.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-11-15 09:50:38 +0100
committerIngo Molnar <mingo@elte.hu>2009-11-15 09:50:41 +0100
commit39dc78b6510323848e3356452f7dab9499736978 (patch)
treecf8a8fede74e41b203fd00e3ccd21ead2e851442 /net/netfilter/xt_connlimit.c
parent4c49b12853fbb5eff4849b7b6a1e895776f027a1 (diff)
parent156171c71a0dc4bce12b4408bb1591f8fe32dc1a (diff)
downloadop-kernel-dev-39dc78b6510323848e3356452f7dab9499736978.zip
op-kernel-dev-39dc78b6510323848e3356452f7dab9499736978.tar.gz
Merge commit 'v2.6.32-rc7' into perf/core
Merge reason: pick up perf fixlets Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/netfilter/xt_connlimit.c')
-rw-r--r--net/netfilter/xt_connlimit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 6809809..38f03f7 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -103,7 +103,7 @@ static int count_them(struct xt_connlimit_data *data,
const struct nf_conntrack_tuple *tuple,
const union nf_inet_addr *addr,
const union nf_inet_addr *mask,
- const struct xt_match *match)
+ u_int8_t family)
{
const struct nf_conntrack_tuple_hash *found;
struct xt_connlimit_conn *conn;
@@ -113,8 +113,7 @@ static int count_them(struct xt_connlimit_data *data,
bool addit = true;
int matches = 0;
-
- if (match->family == NFPROTO_IPV6)
+ if (family == NFPROTO_IPV6)
hash = &data->iphash[connlimit_iphash6(addr, mask)];
else
hash = &data->iphash[connlimit_iphash(addr->ip & mask->ip)];
@@ -157,8 +156,7 @@ static int count_them(struct xt_connlimit_data *data,
continue;
}
- if (same_source_net(addr, mask, &conn->tuple.src.u3,
- match->family))
+ if (same_source_net(addr, mask, &conn->tuple.src.u3, family))
/* same source network -> be counted! */
++matches;
nf_ct_put(found_ct);
@@ -207,7 +205,7 @@ connlimit_mt(const struct sk_buff *skb, const struct xt_match_param *par)
spin_lock_bh(&info->data->lock);
connections = count_them(info->data, tuple_ptr, &addr,
- &info->mask, par->match);
+ &info->mask, par->family);
spin_unlock_bh(&info->data->lock);
if (connections < 0) {
OpenPOWER on IntegriCloud