Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66821
b: refs/heads/master
c: 3583240
h: refs/heads/master
i:
  66819: f310461
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Oct 10, 2007
1 parent 75a60c8 commit 39c7e0c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 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: 7f85f914721ffcef382a57995182916bd43d8a65
refs/heads/master: 3583240249ef354760e04ae49bd7b462a638f40c
3 changes: 0 additions & 3 deletions trunk/include/net/netfilter/nf_conntrack_expect.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ struct nf_conntrack_expect
/* Usage count. */
atomic_t use;

/* Unique ID */
unsigned int id;

/* Flags */
unsigned int flags;

Expand Down
2 changes: 0 additions & 2 deletions trunk/net/netfilter/nf_conntrack_expect.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ static int nf_ct_expect_hash_rnd_initted __read_mostly;
static int nf_ct_expect_vmalloc;

static struct kmem_cache *nf_ct_expect_cachep __read_mostly;
static unsigned int nf_ct_expect_next_id;

/* nf_conntrack_expect helper functions */
void nf_ct_unlink_expect(struct nf_conntrack_expect *exp)
Expand Down Expand Up @@ -302,7 +301,6 @@ static void nf_ct_expect_insert(struct nf_conntrack_expect *exp)
exp->timeout.expires = jiffies + master_help->helper->timeout * HZ;
add_timer(&exp->timeout);

exp->id = ++nf_ct_expect_next_id;
atomic_inc(&exp->use);
NF_CT_STAT_INC(expect_create);
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ ctnetlink_exp_dump_expect(struct sk_buff *skb,
{
struct nf_conn *master = exp->master;
__be32 timeout = htonl((exp->timeout.expires - jiffies) / HZ);
__be32 id = htonl(exp->id);
__be32 id = htonl((unsigned long)exp);

if (ctnetlink_exp_dump_tuple(skb, &exp->tuple, CTA_EXPECT_TUPLE) < 0)
goto nla_put_failure;
Expand Down Expand Up @@ -1346,7 +1346,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,

if (cda[CTA_EXPECT_ID]) {
__be32 id = *(__be32 *)nla_data(cda[CTA_EXPECT_ID]);
if (exp->id != ntohl(id)) {
if (ntohl(id) != (u32)(unsigned long)exp) {
nf_ct_expect_put(exp);
return -ENOENT;
}
Expand Down Expand Up @@ -1400,7 +1400,7 @@ ctnetlink_del_expect(struct sock *ctnl, struct sk_buff *skb,

if (cda[CTA_EXPECT_ID]) {
__be32 id = *(__be32 *)nla_data(cda[CTA_EXPECT_ID]);
if (exp->id != ntohl(id)) {
if (ntohl(id) != (u32)(unsigned long)exp) {
nf_ct_expect_put(exp);
return -ENOENT;
}
Expand Down

0 comments on commit 39c7e0c

Please sign in to comment.