nf_nat: Kills global 'destroy' operation
Subsystems (2)
PATCH 8/10 nf_nat: Kills global 'destroy' operation
This kills the global 'destroy' operation which was used by NAT. Instead it uses the extension infrastructure so that multiple extensions can register own operations.
Signed-off-by Yasuyuki Kozakai <[email protected]>
--- include/net/netfilter/nf_conntrack.h | 3 -- net/ipv4/netfilter/nf_nat_core.c | 46 ++++++++++++++++----------------- net/netfilter/nf_conntrack_core.c | 8 ------ 3 files changed, 22 insertions(+), 35 deletions(-)
include/net/netfilter/nf_conntrack.h +0 -3
@@ -213,9 +213,6 @@ extern void nf_conntrack_tcp_update(struct sk_buff *skb,struct nf_conn *conntrack, int dir); -/* Call me when a conntrack is destroyed. */ -extern void (*nf_conntrack_destroyed)(struct nf_conn *conntrack); -/* Fake conntrack entry for untracked connections */ extern struct nf_conn nf_conntrack_untracked;
net/ipv4/netfilter/nf_nat_core.c +22 -24
76 lines not on this page · raw message
net/netfilter/nf_conntrack_core.c +0 -8
@@ -53,9 +53,6 @@ EXPORT_SYMBOL_GPL(nf_conntrack_lock);atomic_t nf_conntrack_count =ATOMIC_INIT (0 );EXPORT_SYMBOL_GPL (nf_conntrack_count); -void (*nf_conntrack_destroyed)(struct nf_conn *conntrack); -EXPORT_SYMBOL_GPL (nf_conntrack_destroyed); -unsigned int nf_conntrack_htable_size__read_mostly ;EXPORT_SYMBOL_GPL (nf_conntrack_htable_size);
@@ -157,7 +154,6 @@ destroy_conntrack(struct nf_conntrack *nfct) {struct nf_conn *ct = (struct nf_conn *)nfct;struct nf_conntrack_l4proto *l4proto; -typeof (nf_conntrack_destroyed) destroyed;DEBUGP ("destroy_conntrack(%p)\n" , ct);NF_CT_ASSERT (atomic_read (&nfct->use) ==0 );
@@ -177,10 +173,6 @@ destroy_conntrack(struct nf_conntrack *nfct)nf_ct_ext_destroy (ct); - destroyed =rcu_dereference (nf_conntrack_destroyed); -if (destroyed) -destroyed (ct); -rcu_read_unlock ();write_lock_bh (&nf_conntrack_lock);
Signature · 1 line
1.5.2.2