diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index f9d36cab70f4..83c30b45d170 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -63,7 +63,6 @@ unsigned int nf_ct_log_invalid __read_mostly; | |||
63 | HLIST_HEAD(unconfirmed); | 63 | HLIST_HEAD(unconfirmed); |
64 | static int nf_conntrack_vmalloc __read_mostly; | 64 | static int nf_conntrack_vmalloc __read_mostly; |
65 | static struct kmem_cache *nf_conntrack_cachep __read_mostly; | 65 | static struct kmem_cache *nf_conntrack_cachep __read_mostly; |
66 | static unsigned int nf_conntrack_next_id; | ||
67 | 66 | ||
68 | DEFINE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | 67 | DEFINE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); |
69 | EXPORT_PER_CPU_SYMBOL(nf_conntrack_stat); | 68 | EXPORT_PER_CPU_SYMBOL(nf_conntrack_stat); |
@@ -287,7 +286,6 @@ static void __nf_conntrack_hash_insert(struct nf_conn *ct, | |||
287 | unsigned int hash, | 286 | unsigned int hash, |
288 | unsigned int repl_hash) | 287 | unsigned int repl_hash) |
289 | { | 288 | { |
290 | ct->id = ++nf_conntrack_next_id; | ||
291 | hlist_add_head(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnode, | 289 | hlist_add_head(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnode, |
292 | &nf_conntrack_hash[hash]); | 290 | &nf_conntrack_hash[hash]); |
293 | hlist_add_head(&ct->tuplehash[IP_CT_DIR_REPLY].hnode, | 291 | hlist_add_head(&ct->tuplehash[IP_CT_DIR_REPLY].hnode, |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index ce3581266b87..8406aee1cdee 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -257,7 +257,7 @@ nla_put_failure: | |||
257 | static inline int | 257 | static inline int |
258 | ctnetlink_dump_id(struct sk_buff *skb, const struct nf_conn *ct) | 258 | ctnetlink_dump_id(struct sk_buff *skb, const struct nf_conn *ct) |
259 | { | 259 | { |
260 | __be32 id = htonl(ct->id); | 260 | __be32 id = htonl((unsigned long)ct); |
261 | NLA_PUT(skb, CTA_ID, sizeof(u_int32_t), &id); | 261 | NLA_PUT(skb, CTA_ID, sizeof(u_int32_t), &id); |
262 | return 0; | 262 | return 0; |
263 | 263 | ||
@@ -723,7 +723,7 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb, | |||
723 | 723 | ||
724 | if (cda[CTA_ID]) { | 724 | if (cda[CTA_ID]) { |
725 | u_int32_t id = ntohl(*(__be32 *)nla_data(cda[CTA_ID])); | 725 | u_int32_t id = ntohl(*(__be32 *)nla_data(cda[CTA_ID])); |
726 | if (ct->id != id) { | 726 | if (id != (u32)(unsigned long)ct) { |
727 | nf_ct_put(ct); | 727 | nf_ct_put(ct); |
728 | return -ENOENT; | 728 | return -ENOENT; |
729 | } | 729 | } |