diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-08 23:00:54 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-08 23:00:54 -0800 |
commit | d0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4 (patch) | |
tree | daab7cc0db83226672f76d2fc9277e4355f89e6b /net/netfilter | |
parent | 9e0d57fd6dad37d72a3ca6db00ca8c76f2215454 (diff) | |
parent | 2606289779cb297320a185db5997729d29b6700b (diff) | |
download | linux-d0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4.tar.gz linux-d0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4.tar.bz2 linux-d0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/can/usb/ems_usb.c
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/xt_connlimit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index 680980954395..38f03f75a636 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) { |