All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Changli Gao <xiaosuo@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/4] netfilter: xt_connlimit: fix daddr connlimit in SNAT scenario
Date: Tue, 15 Mar 2011 13:21:53 +0100	[thread overview]
Message-ID: <4D7F59E1.5060506@trash.net> (raw)
In-Reply-To: <alpine.LNX.2.01.1103150302310.27019@obet.zrqbmnf.qr>

On 15.03.2011 03:05, Jan Engelhardt wrote:
> On Tuesday 2011-03-15 02:30, Changli Gao wrote:
> 
>> On Tue, Mar 15, 2011 at 9:16 AM, Jan Engelhardt <jengelh@medozas.de> wrote:
>>>
>>>
>>> The original tuple may not be updated, but the reply tuple is.
>>> And we are taking the reply tuple in
>>>
>>>        tuple_ptr = &ct->tuplehash[IP_CT_DIR_REPLY].tuple;
>>>
>>> which is subsequently copied to conn->tuple on the first invocation.
>>>
>>> Afterwards, SNAT will update ct->tuplehash[reply].tuple, and so
>>> conn->tuple is outdated. Calling nf_conntrack_find_get(conn->tuple)
>>> in count_them would then fail, would it not?
>>>
>>
>> After my patch, tuple is only used to look up the corresponding
>> conntrack.
> 
> Ok, the patch may be applied. Somehow I was under the impression
> addr was extracted from tuple_ptr, but it is, in fact, not.
> 

OK, thanks, I'll apply patches 1-4.

  reply	other threads:[~2011-03-15 12:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14  6:50 [PATCH 1/4] netfilter: xt_connlimit: fix daddr connlimit in SNAT scenario Changli Gao
2011-03-14  6:50 ` [PATCH 2/4] netfilter: xt_connlimit: use kmalloc() instead of kzalloc() Changli Gao
2011-03-15 12:25   ` Patrick McHardy
2011-03-14  6:50 ` [PATCH 3/4] netfilter: xt_connlimit: use hlist instead Changli Gao
2011-03-15 12:26   ` Patrick McHardy
2011-03-14  6:50 ` [PATCH 4/4] netfilter: xt_connlimit: remove connlimit_rnd_inited Changli Gao
2011-03-15 12:26   ` Patrick McHardy
2011-03-14 12:26 ` [PATCH 1/4] netfilter: xt_connlimit: fix daddr connlimit in SNAT scenario Jan Engelhardt
2011-03-14 12:42   ` Changli Gao
2011-03-14 18:32     ` Patrick McHardy
2011-03-14 19:00     ` Jan Engelhardt
2011-03-14 23:49       ` Changli Gao
2011-03-15  1:16         ` Jan Engelhardt
2011-03-15  1:30           ` Changli Gao
2011-03-15  2:05             ` Jan Engelhardt
2011-03-15 12:21               ` Patrick McHardy [this message]
2011-03-15 12:24 ` 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=4D7F59E1.5060506@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=jengelh@medozas.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=xiaosuo@gmail.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.