Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112077
b: refs/heads/master
c: 63c9a26
h: refs/heads/master
i:
  112075: de82186
v: v3
  • Loading branch information
Alexey Dobriyan authored and Patrick McHardy committed Oct 8, 2008
1 parent c52e780 commit 8116b3c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 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: 9b03f38d0487f3908696242286d934c9b38f9d2a
refs/heads/master: 63c9a26264be108b52de087724673f8664570e34
1 change: 0 additions & 1 deletion trunk/include/net/netfilter/nf_conntrack_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,5 @@ print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
const struct nf_conntrack_l4proto *proto);

extern spinlock_t nf_conntrack_lock ;
extern struct hlist_head unconfirmed;

#endif /* _NF_CONNTRACK_CORE_H */
2 changes: 2 additions & 0 deletions trunk/include/net/netns/conntrack.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#ifndef __NETNS_CONNTRACK_H
#define __NETNS_CONNTRACK_H

#include <linux/list.h>
#include <asm/atomic.h>

struct netns_ct {
atomic_t count;
unsigned int expect_count;
struct hlist_head *hash;
struct hlist_head *expect_hash;
struct hlist_head unconfirmed;
int hash_vmalloc;
int expect_vmalloc;
};
Expand Down
7 changes: 4 additions & 3 deletions trunk/net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ struct nf_conn nf_conntrack_untracked __read_mostly;
EXPORT_SYMBOL_GPL(nf_conntrack_untracked);

unsigned int nf_ct_log_invalid __read_mostly;
HLIST_HEAD(unconfirmed);
static struct kmem_cache *nf_conntrack_cachep __read_mostly;

DEFINE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat);
Expand Down Expand Up @@ -596,7 +595,8 @@ init_conntrack(struct net *net,
}

/* Overload tuple linked list to put us in unconfirmed list. */
hlist_add_head(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnode, &unconfirmed);
hlist_add_head(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnode,
&net->ct.unconfirmed);

spin_unlock_bh(&nf_conntrack_lock);

Expand Down Expand Up @@ -957,7 +957,7 @@ get_next_corpse(struct net *net, int (*iter)(struct nf_conn *i, void *data),
goto found;
}
}
hlist_for_each_entry(h, n, &unconfirmed, hnode) {
hlist_for_each_entry(h, n, &net->ct.unconfirmed, hnode) {
ct = nf_ct_tuplehash_to_ctrack(h);
if (iter(ct, data))
set_bit(IPS_DYING_BIT, &ct->status);
Expand Down Expand Up @@ -1154,6 +1154,7 @@ int nf_conntrack_init(struct net *net)
printk(KERN_ERR "Unable to create nf_conntrack_hash\n");
goto err_out;
}
INIT_HLIST_HEAD(&net->ct.unconfirmed);

nf_conntrack_max = max_factor * nf_conntrack_htable_size;

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/netfilter/nf_conntrack_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void nf_conntrack_helper_unregister(struct nf_conntrack_helper *me)
}

/* Get rid of expecteds, set helpers to NULL. */
hlist_for_each_entry(h, n, &unconfirmed, hnode)
hlist_for_each_entry(h, n, &init_net.ct.unconfirmed, hnode)
unhelp(h, me);
for (i = 0; i < nf_conntrack_htable_size; i++) {
hlist_for_each_entry(h, n, &init_net.ct.hash[i], hnode)
Expand Down

0 comments on commit 8116b3c

Please sign in to comment.