summaryrefslogtreecommitdiffstats
path: root/net/netfilter/core.c
diff options
context:
space:
mode:
authorYasuyuki Kozakai2007-03-23 19:17:27 +0100
committerDavid S. Miller2007-04-26 07:27:45 +0200
commitde6e05c49f8b4ed63224c5d38891f531ecc4eabb (patch)
tree2ed69a03c657a5618bc98a5f74acb905bf764ecf /net/netfilter/core.c
parent[NETFILTER]: nf_conntrack: don't use nfct in skb if conntrack is disabled (diff)
downloadkernel-qcow2-linux-de6e05c49f8b4ed63224c5d38891f531ecc4eabb.tar.gz
kernel-qcow2-linux-de6e05c49f8b4ed63224c5d38891f531ecc4eabb.tar.xz
kernel-qcow2-linux-de6e05c49f8b4ed63224c5d38891f531ecc4eabb.zip
[NETFILTER]: nf_conntrack: kill destroy() in struct nf_conntrack for diet
The destructor per conntrack is unnecessary, then this replaces it with system wide destructor. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/core.c')
-rw-r--r--net/netfilter/core.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index fe5f22df620c..a84478ee2ded 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -260,7 +260,22 @@ void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb)
}
}
EXPORT_SYMBOL(nf_ct_attach);
-#endif
+
+void (*nf_ct_destroy)(struct nf_conntrack *);
+EXPORT_SYMBOL(nf_ct_destroy);
+
+void nf_conntrack_destroy(struct nf_conntrack *nfct)
+{
+ void (*destroy)(struct nf_conntrack *);
+
+ rcu_read_lock();
+ destroy = rcu_dereference(nf_ct_destroy);
+ BUG_ON(destroy == NULL);
+ destroy(nfct);
+ rcu_read_unlock();
+}
+EXPORT_SYMBOL(nf_conntrack_destroy);
+#endif /* CONFIG_NF_CONNTRACK */
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_net_netfilter;