All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netfilter-devel@lists.netfilter.org, Patrick McHardy <kaber@trash.net>
Subject: [NETFILTER 02/05]: nf_conntrack: move registration of __nf_ct_attach
Date: Thu, 16 Feb 2006 00:00:29 +0100 (MET)	[thread overview]
Message-ID: <20060215230029.25078.58330.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20060215230026.25078.33875.sendpatchset@localhost.localdomain>

[NETFILTER]: nf_conntrack: move registration of __nf_ct_attach

Move registration of __nf_ct_attach to nf_conntrack_core to make it usable
for IPv6 connection tracking as well.

Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit cb4fe8d7dc75acc6aa0f3ac21b286a3e2f8bc492
tree 1e24f1628e341fa43c4972f347ab54aee1196aa1
parent 1a99739a0044eae74cc17a6ae168bb30b49932d8
author Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Wed, 15 Feb 2006 11:01:49 +0100
committer Patrick McHardy <kaber@trash.net> Wed, 15 Feb 2006 11:01:49 +0100

 net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c |    5 -----
 net/netfilter/nf_conntrack_core.c              |    5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index 167619f..6c8624a 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -529,15 +529,10 @@ static int init_or_cleanup(int init)
 		goto cleanup_localinops;
 	}
 #endif
-
-	/* For use by REJECT target */
-	ip_ct_attach = __nf_conntrack_attach;
-
 	return ret;
 
  cleanup:
 	synchronize_net();
-	ip_ct_attach = NULL;
 #ifdef CONFIG_SYSCTL
  	unregister_sysctl_table(nf_ct_ipv4_sysctl_header);
  cleanup_localinops:
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 0ce337a..d622ddf 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1556,6 +1556,8 @@ void nf_conntrack_cleanup(void)
 {
 	int i;
 
+	ip_ct_attach = NULL;
+
 	/* This makes sure all current packets have passed through
 	   netfilter framework.  Roll on, two-stage module
 	   delete... */
@@ -1715,6 +1717,9 @@ int __init nf_conntrack_init(void)
 		nf_ct_l3protos[i] = &nf_conntrack_generic_l3proto;
         write_unlock_bh(&nf_conntrack_lock);
 
+	/* For use by REJECT target */
+	ip_ct_attach = __nf_conntrack_attach;
+
 	/* Set up fake conntrack:
 	    - to never be deleted, not in any hashes */
 	atomic_set(&nf_conntrack_untracked.ct_general.use, 1);

  parent reply	other threads:[~2006-02-15 23:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-15 23:00 [00/05]: Netfilter fixes for 2.6.16 Patrick McHardy
2006-02-15 23:00 ` [NETFILTER 01/05]: x_tables: fix dependencies of conntrack related modules Patrick McHardy
2006-02-15 23:21   ` David S. Miller
2006-02-15 23:00 ` Patrick McHardy [this message]
2006-02-15 23:22   ` [NETFILTER 02/05]: nf_conntrack: move registration of __nf_ct_attach David S. Miller
2006-02-15 23:00 ` [NETFILTER 03/05]: nf_conntrack: attach conntrack to TCP RST generated by ip6t_REJECT Patrick McHardy
2006-02-15 23:23   ` David S. Miller
2006-02-15 23:38     ` Patrick McHardy
2006-02-15 23:00 ` [NETFILTER 04/05]: nf_conntrack: attach conntrack to locally generated ICMPv6 error Patrick McHardy
2006-02-15 23:24   ` David S. Miller
2006-02-15 23:00 ` [NETFILTER 05/05]: nf_conntrack: Fix TCP/UDP HW checksum handling for IPv6 packet Patrick McHardy
2006-02-15 23:25   ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060215230029.25078.58330.sendpatchset@localhost.localdomain \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.