aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>2007-03-23 14:17:07 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:27:44 -0400
commit5f79e0f916a3bdeccc910fdf466bca582a9b2cca (patch)
treeef6cb09587609597e611ad38c313df88d8ff2e8b /net
parente6f689db51a789807edede411b32eb7c9e457948 (diff)
[NETFILTER]: nf_conntrack: don't use nfct in skb if conntrack is disabled
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')
-rw-r--r--net/core/skbuff.c4
-rw-r--r--net/netfilter/core.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index e28f119156f7..f16c72204cf6 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -325,15 +325,13 @@ void __kfree_skb(struct sk_buff *skb)
325 WARN_ON(in_irq()); 325 WARN_ON(in_irq());
326 skb->destructor(skb); 326 skb->destructor(skb);
327 } 327 }
328#ifdef CONFIG_NETFILTER
329 nf_conntrack_put(skb->nfct);
330#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 328#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
329 nf_conntrack_put(skb->nfct);
331 nf_conntrack_put_reasm(skb->nfct_reasm); 330 nf_conntrack_put_reasm(skb->nfct_reasm);
332#endif 331#endif
333#ifdef CONFIG_BRIDGE_NETFILTER 332#ifdef CONFIG_BRIDGE_NETFILTER
334 nf_bridge_put(skb->nf_bridge); 333 nf_bridge_put(skb->nf_bridge);
335#endif 334#endif
336#endif
337/* XXX: IS this still necessary? - JHS */ 335/* XXX: IS this still necessary? - JHS */
338#ifdef CONFIG_NET_SCHED 336#ifdef CONFIG_NET_SCHED
339 skb->tc_index = 0; 337 skb->tc_index = 0;
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index d802b342c615..fe5f22df620c 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -240,6 +240,7 @@ void nf_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb,
240} 240}
241EXPORT_SYMBOL(nf_proto_csum_replace4); 241EXPORT_SYMBOL(nf_proto_csum_replace4);
242 242
243#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
243/* This does not belong here, but locally generated errors need it if connection 244/* This does not belong here, but locally generated errors need it if connection
244 tracking in use: without this, connection may not be in hash table, and hence 245 tracking in use: without this, connection may not be in hash table, and hence
245 manufactured ICMP or RST packets will not be associated with it. */ 246 manufactured ICMP or RST packets will not be associated with it. */
@@ -259,6 +260,7 @@ void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb)
259 } 260 }
260} 261}
261EXPORT_SYMBOL(nf_ct_attach); 262EXPORT_SYMBOL(nf_ct_attach);
263#endif
262 264
263#ifdef CONFIG_PROC_FS 265#ifdef CONFIG_PROC_FS
264struct proc_dir_entry *proc_net_netfilter; 266struct proc_dir_entry *proc_net_netfilter;