netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: nf_conntrack: set conntrack templates again if we	return NF_REPEAT
Date: Wed, 09 Feb 2011 08:09:17 +0100	[thread overview]
Message-ID: <4D523D9D.5050405@trash.net> (raw)
In-Reply-To: <20110207114051.32414.65019.stgit@decadence>

Am 07.02.2011 12:40, schrieb Pablo Neira Ayuso:
> The TCP tracking code has a special case that allows to return
> NF_REPEAT if we receive a new SYN packet while in TIME_WAIT state.
> 
> In this situation, the TCP tracking code destroys the existing
> conntrack to start a new clean session.
> 
> [DESTROY] tcp      6 src=192.168.0.2 dst=192.168.1.2 sport=38925 dport=8000 src=192.168.1.2 dst=192.168.1.100 sport=8000 dport=38925 [ASSURED]
>     [NEW] tcp      6 120 SYN_SENT src=192.168.0.2 dst=192.168.1.2 sport=38925 dport=8000 [UNREPLIED] src=192.168.1.2 dst=192.168.1.100 sport=8000 dport=38925
> 
> However, this is a problem for the iptables' CT target event filtering
> which will not work in this case since the conntrack template will not
> be there for the new session. To fix this, we reassign the conntrack
> template to the packet if we return NF_REPEAT.
> 
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> ---
>  net/netfilter/nf_conntrack_core.c |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)

Nice catch. Applied, thanks.

      reply	other threads:[~2011-02-09  7:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 11:40 [PATCH] One fix for iptables' CT event filtering Pablo Neira Ayuso
2011-02-07 11:40 ` [PATCH] netfilter: nf_conntrack: set conntrack templates again if we return NF_REPEAT Pablo Neira Ayuso
2011-02-09  7:09   ` Patrick McHardy [this message]

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=4D523D9D.5050405@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@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 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).