diff options
-rw-r--r-- | include/net/netfilter/nf_conntrack_core.h | 1 | ||||
-rw-r--r-- | include/net/netns/conntrack.h | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 7 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_helper.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h index 1c373564396a..b4b45c541da6 100644 --- a/include/net/netfilter/nf_conntrack_core.h +++ b/include/net/netfilter/nf_conntrack_core.h | |||
@@ -72,6 +72,5 @@ print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, | |||
72 | const struct nf_conntrack_l4proto *proto); | 72 | const struct nf_conntrack_l4proto *proto); |
73 | 73 | ||
74 | extern spinlock_t nf_conntrack_lock ; | 74 | extern spinlock_t nf_conntrack_lock ; |
75 | extern struct hlist_head unconfirmed; | ||
76 | 75 | ||
77 | #endif /* _NF_CONNTRACK_CORE_H */ | 76 | #endif /* _NF_CONNTRACK_CORE_H */ |
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index e453a33f3e93..6ddf58e142a9 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __NETNS_CONNTRACK_H | 1 | #ifndef __NETNS_CONNTRACK_H |
2 | #define __NETNS_CONNTRACK_H | 2 | #define __NETNS_CONNTRACK_H |
3 | 3 | ||
4 | #include <linux/list.h> | ||
4 | #include <asm/atomic.h> | 5 | #include <asm/atomic.h> |
5 | 6 | ||
6 | struct netns_ct { | 7 | struct netns_ct { |
@@ -8,6 +9,7 @@ struct netns_ct { | |||
8 | unsigned int expect_count; | 9 | unsigned int expect_count; |
9 | struct hlist_head *hash; | 10 | struct hlist_head *hash; |
10 | struct hlist_head *expect_hash; | 11 | struct hlist_head *expect_hash; |
12 | struct hlist_head unconfirmed; | ||
11 | int hash_vmalloc; | 13 | int hash_vmalloc; |
12 | int expect_vmalloc; | 14 | int expect_vmalloc; |
13 | }; | 15 | }; |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index c188edea2492..2a105db13307 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -54,7 +54,6 @@ struct nf_conn nf_conntrack_untracked __read_mostly; | |||
54 | EXPORT_SYMBOL_GPL(nf_conntrack_untracked); | 54 | EXPORT_SYMBOL_GPL(nf_conntrack_untracked); |
55 | 55 | ||
56 | unsigned int nf_ct_log_invalid __read_mostly; | 56 | unsigned int nf_ct_log_invalid __read_mostly; |
57 | HLIST_HEAD(unconfirmed); | ||
58 | static struct kmem_cache *nf_conntrack_cachep __read_mostly; | 57 | static struct kmem_cache *nf_conntrack_cachep __read_mostly; |
59 | 58 | ||
60 | DEFINE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | 59 | DEFINE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); |
@@ -596,7 +595,8 @@ init_conntrack(struct net *net, | |||
596 | } | 595 | } |
597 | 596 | ||
598 | /* Overload tuple linked list to put us in unconfirmed list. */ | 597 | /* Overload tuple linked list to put us in unconfirmed list. */ |
599 | hlist_add_head(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnode, &unconfirmed); | 598 | hlist_add_head(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnode, |
599 | &net->ct.unconfirmed); | ||
600 | 600 | ||
601 | spin_unlock_bh(&nf_conntrack_lock); | 601 | spin_unlock_bh(&nf_conntrack_lock); |
602 | 602 | ||
@@ -957,7 +957,7 @@ get_next_corpse(struct net *net, int (*iter)(struct nf_conn *i, void *data), | |||
957 | goto found; | 957 | goto found; |
958 | } | 958 | } |
959 | } | 959 | } |
960 | hlist_for_each_entry(h, n, &unconfirmed, hnode) { | 960 | hlist_for_each_entry(h, n, &net->ct.unconfirmed, hnode) { |
961 | ct = nf_ct_tuplehash_to_ctrack(h); | 961 | ct = nf_ct_tuplehash_to_ctrack(h); |
962 | if (iter(ct, data)) | 962 | if (iter(ct, data)) |
963 | set_bit(IPS_DYING_BIT, &ct->status); | 963 | set_bit(IPS_DYING_BIT, &ct->status); |
@@ -1154,6 +1154,7 @@ int nf_conntrack_init(struct net *net) | |||
1154 | printk(KERN_ERR "Unable to create nf_conntrack_hash\n"); | 1154 | printk(KERN_ERR "Unable to create nf_conntrack_hash\n"); |
1155 | goto err_out; | 1155 | goto err_out; |
1156 | } | 1156 | } |
1157 | INIT_HLIST_HEAD(&net->ct.unconfirmed); | ||
1157 | 1158 | ||
1158 | nf_conntrack_max = max_factor * nf_conntrack_htable_size; | 1159 | nf_conntrack_max = max_factor * nf_conntrack_htable_size; |
1159 | 1160 | ||
diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c index c793db810cd5..920e778539a9 100644 --- a/net/netfilter/nf_conntrack_helper.c +++ b/net/netfilter/nf_conntrack_helper.c | |||
@@ -156,7 +156,7 @@ void nf_conntrack_helper_unregister(struct nf_conntrack_helper *me) | |||
156 | } | 156 | } |
157 | 157 | ||
158 | /* Get rid of expecteds, set helpers to NULL. */ | 158 | /* Get rid of expecteds, set helpers to NULL. */ |
159 | hlist_for_each_entry(h, n, &unconfirmed, hnode) | 159 | hlist_for_each_entry(h, n, &init_net.ct.unconfirmed, hnode) |
160 | unhelp(h, me); | 160 | unhelp(h, me); |
161 | for (i = 0; i < nf_conntrack_htable_size; i++) { | 161 | for (i = 0; i < nf_conntrack_htable_size; i++) { |
162 | hlist_for_each_entry(h, n, &init_net.ct.hash[i], hnode) | 162 | hlist_for_each_entry(h, n, &init_net.ct.hash[i], hnode) |