From: Patrick McHardy <kaber@trash.net>
To: Nishit Shah <nishit@elitecore.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: problem with connection tracking with fragmentation needed icmp error
Date: Fri, 03 Nov 2006 11:44:16 +0100 [thread overview]
Message-ID: <454B1D80.2010500@trash.net> (raw)
In-Reply-To: <022501c6ff34$f842d6b0$4c01a8c0@elitecore26>
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
Nishit Shah wrote:
> Well,
> router and firewall both running with kernel 2.6.16.13 and one
> more thing, i got invalid state on firewall not on router, i am not running
> conntrack on router machine.(i guess firewall machine is not able to relate
> this error msg with existing conntrack entry)
The reason for this is that ICMP connection tracking entries get
destroyed once a reply has been seen for every outstanding request.
So when the ICMP error arrives there is no connection it relates
to, so it is considered invalid. We could change this to keep
it alive for some short period of time.
Does this patch help?
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1135 bytes --]
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
index 295b6fa..b62f8bb 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
@@ -21,6 +21,7 @@ #include <linux/netfilter_ipv4/ip_conntr
#include <linux/netfilter_ipv4/ip_conntrack_core.h>
#include <linux/netfilter_ipv4/ip_conntrack_protocol.h>
+unsigned int ip_ct_icmp_timeout_replied __read_mostly = HZ + HZ/2;
unsigned int ip_ct_icmp_timeout __read_mostly = 30*HZ;
#if 0
@@ -98,9 +99,9 @@ static int icmp_packet(struct ip_conntra
means this will only run once even if count hits zero twice
(theoretically possible with SMP) */
if (CTINFO2DIR(ctinfo) == IP_CT_DIR_REPLY) {
- if (atomic_dec_and_test(&ct->proto.icmp.count)
- && del_timer(&ct->timeout))
- ct->timeout.function((unsigned long)ct);
+ if (atomic_dec_and_test(&ct->proto.icmp.count))
+ ip_ct_refresh_acct(ct, ctinfo, skb,
+ ip_ct_icmp_timeout_replied);
} else {
atomic_inc(&ct->proto.icmp.count);
ip_conntrack_event_cache(IPCT_PROTOINFO_VOLATILE, skb);
next prev parent reply other threads:[~2006-11-03 10:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-02 6:54 problem with connection tracking with fragmentation needed icmp error Nishit Shah
2006-11-03 10:19 ` Patrick McHardy
2006-11-03 10:43 ` Nishit Shah
2006-11-03 10:44 ` Patrick McHardy [this message]
2006-11-04 5:42 ` Nishit Shah
2006-11-06 14:01 ` Patrick McHardy
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=454B1D80.2010500@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@lists.netfilter.org \
--cc=nishit@elitecore.com \
/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.