Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184134
b: refs/heads/master
c: 83fc810
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Dobriyan authored and Patrick McHardy committed Jan 18, 2010
1 parent 93832a4 commit b486bad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9592a5c01e79dbc59eb56fa26b124e94ffcd0962
refs/heads/master: 83fc81024bd8572f31db784f8c0079e999a4fa44
8 changes: 5 additions & 3 deletions trunk/net/netfilter/xt_connlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ same_source_net(const union nf_inet_addr *addr,
}
}

static int count_them(struct xt_connlimit_data *data,
static int count_them(struct net *net,
struct xt_connlimit_data *data,
const struct nf_conntrack_tuple *tuple,
const union nf_inet_addr *addr,
const union nf_inet_addr *mask,
Expand All @@ -113,7 +114,7 @@ static int count_them(struct xt_connlimit_data *data,

/* check the saved connections */
list_for_each_entry_safe(conn, tmp, hash, list) {
found = nf_conntrack_find_get(&init_net, &conn->tuple);
found = nf_conntrack_find_get(net, &conn->tuple);
found_ct = NULL;

if (found != NULL)
Expand Down Expand Up @@ -171,6 +172,7 @@ static int count_them(struct xt_connlimit_data *data,
static bool
connlimit_mt(const struct sk_buff *skb, const struct xt_match_param *par)
{
struct net *net = dev_net(par->in ? par->in : par->out);
const struct xt_connlimit_info *info = par->matchinfo;
union nf_inet_addr addr;
struct nf_conntrack_tuple tuple;
Expand All @@ -195,7 +197,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,
connections = count_them(net, info->data, tuple_ptr, &addr,
&info->mask, par->family);
spin_unlock_bh(&info->data->lock);

Expand Down

0 comments on commit b486bad

Please sign in to comment.