netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jan Kasprzak <kas@fi.muni.cz>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [RFD,patch] ICMP echo conntrack timeout
Date: Tue, 02 Jun 2009 13:46:47 +0200	[thread overview]
Message-ID: <4A251127.8000605@netfilter.org> (raw)
In-Reply-To: <20090601174352.GH31797@fi.muni.cz>

Hi Jan,

Jan Kasprzak wrote:
> 	Hello, netfilter developers!
> 
> I am trying to delploy a conntrackd-based HA router and (if possible) a
> flow statistics collector. I have discovered that nf_conntrack treats each
> ICMP echo request/reply pair as a separate connection (in
> net/ipv4/netfilter/nf_conntrack_proto_icmp.c:icmp_packet() function).
> This has several problems:
> 
> - excessive conntrackd traffic when the ping is running over the router
> 	(one new "connection" per echo request/reply pair).

Indeed, one event per new ICMP echo packet is too much. This can be also
a way to exhaust resources of the conntrack subsystem.

> - should there be a duplicated ICMP echo reply (such as when when pinging
> 	a cluster IP address), only the first echo reply is seen as
> 	ESTABLISHED, the rest is INVALID.
> 
> - no "per-flow" statistics available, as there is no notion of the "flow"		at all.

Indeed, no packet accounting at all.

> 	I think it would be better to keep the default timeout of
> nf_ct_icmp_timeout even after the echo reply is received. Feel free
> to correct me why early deleting of ICMP conntrack entries is needed,
> or consider applying the following patch.

The only problem that I see is that you patch relaxes the current
checking that we're doing. I mean, for every packet in one direction we
only accept one ICMP reply packet. With your patch, we can accept more
than one packet in the reply direction.

I have a similar patch in my internal tree. It allows only one reply
packet per original and many packet in the original direction as you
want. I'll post it asap so we can discuss on it.

-- 
"Los honestos son inadaptados sociales" -- Les Luthiers

  reply	other threads:[~2009-06-02 12:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-01 17:43 [RFD,patch] ICMP echo conntrack timeout Jan Kasprzak
2009-06-02 11:46 ` Pablo Neira Ayuso [this message]
2009-06-02 12:47   ` Jan Kasprzak
2009-06-02 12:48   ` Patrick McHardy
2009-06-02 14:53     ` Pablo Neira Ayuso
2009-06-02 15:01       ` Patrick McHardy
2009-06-02 15:20         ` Pablo Neira Ayuso
2009-06-02 12:10 ` Patrick McHardy
2009-06-05 10:46 ` Patrick McHardy
2009-06-07  1:03   ` Jan Kasprzak
2009-06-08 13:54     ` 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=4A251127.8000605@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=kas@fi.muni.cz \
    --cc=netfilter-devel@vger.kernel.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 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).