From: "Nishit Shah" <nishit@elitecore.com>
To: "Patrick McHardy" <kaber@trash.net>
Cc: "Yasuyuki KOZAKAI" <yasuyuki.kozakai@toshiba.co.jp>,
"Netfilter Development Mailinglist"
<netfilter-devel@vger.kernel.org>
Subject: Re: rmmod ip_conntrack hangs.....
Date: Fri, 12 Oct 2007 20:32:06 +0530 [thread overview]
Message-ID: <008a01c80ce0$dab87b30$4c01a8c0@elitecore.com> (raw)
In-Reply-To: 470DB193.7020806@trash.net
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
Sorry for that !!!!!
I am adding the attachment !!!!
Rgds,
Nishit Shah.
----- Original Message -----
From: "Patrick McHardy" <kaber@trash.net>
To: <nishit@elitecore.com>
Cc: "Yasuyuki KOZAKAI" <yasuyuki.kozakai@toshiba.co.jp>; "Netfilter
Development Mailinglist" <netfilter-devel@vger.kernel.org>
Sent: Thursday, October 11, 2007 10:46 AM
Subject: Re: rmmod ip_conntrack hangs.....
> nishit@elitecore.com wrote:
> > Hi,
> > I am adding the patch that patrick had submitted.
>
>
> The patch doesn't apply because your mailer replaced tabs by spaces.
> Please resend as attachment, thanks.
>
[-- Attachment #2: rmmod_conntrack --]
[-- Type: application/octet-stream, Size: 2615 bytes --]
diff -Paur linux-2.6.16.13/include/linux/netfilter_ipv4/ip_conntrack_core.h linux-2.6.16.13-dev/include/linux/netfilter_ipv4/ip_conntrack_core.h
--- linux-2.6.16.13/include/linux/netfilter_ipv4/ip_conntrack_core.h Wed May 3 03:08:44 2006
+++ linux-2.6.16.13-dev/include/linux/netfilter_ipv4/ip_conntrack_core.h Fri Oct 12 19:39:45 2007
@@ -45,7 +45,7 @@
int ret = NF_ACCEPT;
if (ct) {
- if (!is_confirmed(ct))
+ if (!is_confirmed(ct) && !is_dying(ct))
ret = __ip_conntrack_confirm(pskb);
ip_ct_deliver_cached_events(ct);
}
diff -Paur linux-2.6.16.13/include/net/netfilter/nf_conntrack_core.h linux-2.6.16.13-dev/include/net/netfilter/nf_conntrack_core.h
--- linux-2.6.16.13/include/net/netfilter/nf_conntrack_core.h Wed May 3 03:08:44 2006
+++ linux-2.6.16.13-dev/include/net/netfilter/nf_conntrack_core.h Fri Oct 12 19:40:52 2007
@@ -61,7 +61,7 @@
int ret = NF_ACCEPT;
if (ct) {
- if (!nf_ct_is_confirmed(ct))
+ if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct))
ret = __nf_conntrack_confirm(pskb);
nf_ct_deliver_cached_events(ct);
}
diff -Paur linux-2.6.16.13/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.16.13-dev/net/ipv4/netfilter/ip_conntrack_core.c
--- linux-2.6.16.13/net/ipv4/netfilter/ip_conntrack_core.c Wed May 3 03:08:44 2006
+++ linux-2.6.16.13-dev/net/ipv4/netfilter/ip_conntrack_core.c Fri Oct 12 19:30:38 2007
@@ -1251,11 +1251,18 @@
if (h)
break;
}
- if (!h)
+ if (!h){
h = LIST_FIND_W(&unconfirmed, do_iter,
struct ip_conntrack_tuple_hash *, iter, data);
- if (h)
+ if (h){
+ struct ip_conntrack * ct = tuplehash_to_ctrack(h);
+ if (iter(ct, data))
+ set_bit(IPS_DYING_BIT, &ct->status);
+ }
+ h = NULL;
+ }else{
atomic_inc(&tuplehash_to_ctrack(h)->ct_general.use);
+ }
write_unlock_bh(&ip_conntrack_lock);
return h;
diff -Paur linux-2.6.16.13/net/netfilter/nf_conntrack_core.c linux-2.6.16.13-dev/net/netfilter/nf_conntrack_core.c
--- linux-2.6.16.13/net/netfilter/nf_conntrack_core.c Wed May 3 03:08:44 2006
+++ linux-2.6.16.13-dev/net/netfilter/nf_conntrack_core.c Fri Oct 12 19:38:23 2007
@@ -1504,11 +1504,18 @@
if (h)
break;
}
- if (!h)
+ if (!h){
h = LIST_FIND_W(&unconfirmed, do_iter,
struct nf_conntrack_tuple_hash *, iter, data);
- if (h)
+ if (h){
+ struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(h);
+ if (iter(ct, data))
+ set_bit(IPS_DYING_BIT, &ct->status);
+ }
+ h = NULL;
+ }else{
atomic_inc(&nf_ct_tuplehash_to_ctrack(h)->ct_general.use);
+ }
write_unlock_bh(&nf_conntrack_lock);
return h;
next prev parent reply other threads:[~2007-10-12 15:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-25 7:00 rmmod ip_conntrack hangs Nishit Shah
2007-04-25 14:18 ` Phil Oester
2007-04-26 5:45 ` Nishit Shah
2007-04-26 11:05 ` Yasuyuki KOZAKAI
[not found] ` <200704261105.l3QB59NB010836@toshiba.co.jp>
2007-04-26 12:16 ` Nishit Shah
2007-04-26 16:17 ` Patrick McHardy
2007-04-27 5:56 ` Nishit Shah
[not found] ` <048501c80812$0d372350$4c01a8c0@elitecore.com>
2007-10-08 4:30 ` Patrick McHardy
2007-10-10 19:15 ` nishit
2007-10-11 5:16 ` Patrick McHardy
2007-10-12 15:02 ` Nishit Shah [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-10-23 12:30 Nishit Shah
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='008a01c80ce0$dab87b30$4c01a8c0@elitecore.com' \
--to=nishit@elitecore.com \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=yasuyuki.kozakai@toshiba.co.jp \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).