From: Pablo Neira Ayuso <pablo@eurodev.net>
To: Eric Leblond <eric@inl.fr>
Cc: nufw-core-team@nufw.org, netfilter-devel@lists.netfilter.org
Subject: Re: [feature request] Fixed timeout for conntrack entry
Date: Tue, 24 Jan 2006 01:30:29 +0100 [thread overview]
Message-ID: <43D57525.7080907@eurodev.net> (raw)
In-Reply-To: <1138008265.11978.29.camel@localhost.localdomain>
Hi Eric,
Eric Leblond wrote:
> When working on NuFW (http://www.nufw.org), we had to use libconntrack
> to kill some entry at a given time. In fact, we use it to be able to
> have connections that expire at a given time. At the same time we use
> event handling system to be warned of connections that were closed
> before their expiration by the users.
>
> This works well but there is a synchronisation problem because when the
> NuFW daemon restart you have to synchronise to handle events that have
> occur during shutdown :
> Let's have a connection and let it die when the daemon is off. When
> daemon restart, it could ask kernel to close this connection but it
> could then be another existing connection (with the same IPV4 or id
> parameters). Arghh ...
That's very unlikely to happen. If a new connection is opened with the
same IP information, the ID will be different than the old connection.
So such problem is unlikely to happen. Unless the daemon is so slow that
a wraparound happened to the global ID, eg. 2^32 connections were opened
at the time that the daemon was restarting. That would be really slow :)
> Even if it can be done with current functionnalities of conntrack
> (dumping conntrack table to daemon at start), it seems that this is not
> the cleanest way to do.
>
> In fact, connection expiration is often a user requested feature
> (independantly of userspace system) and it could be great to have it
> hard wired in the kernel. For example, an iptables match and target
> could use it.
>
> From a developpement point of view it seems that this is a "small"
> modification of code. It could be done by adding a test when refreshing
> standard connection entry timeout (when receiving a packet) and testing
> if the connection must be destroy and destroy it if needed ?
I think that we could add support for permanent conntracks, eg.
conntracks that never expire. So the userspace program could have their
own timers and kill it whenever it wants to. The problem is that the
userspace program must behave correctly, otherwise we could get tons of
zombie conntracks that never expire.
--
Pablo
next prev parent reply other threads:[~2006-01-24 0:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-23 9:24 [feature request] Fixed timeout for conntrack entry Eric Leblond
2006-01-24 0:30 ` Pablo Neira Ayuso [this message]
2006-01-24 17:11 ` Amin Azez
2006-01-24 21:04 ` Eric Leblond
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=43D57525.7080907@eurodev.net \
--to=pablo@eurodev.net \
--cc=eric@inl.fr \
--cc=netfilter-devel@lists.netfilter.org \
--cc=nufw-core-team@nufw.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.