From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf] netfilter: conntrack: do not auto-delete clash entries on reply
Date: Fri, 28 Aug 2020 18:30:16 +0200 [thread overview]
Message-ID: <20200828163016.GA16743@salvia> (raw)
In-Reply-To: <20200825220718.12866-1-fw@strlen.de>
On Wed, Aug 26, 2020 at 12:07:18AM +0200, Florian Westphal wrote:
> Its possible that we have more than one packet with the same ct tuple
> simultaneously, e.g. when an application emits n packets on same UDP
> socket from multiple threads.
>
> NAT rules might be applied to those packets. With the right set of rules,
> n packets will be mapped to m destinations, where at least two packets end
> up with the same destination.
>
> When this happens, the existing clash resolution may merge the skb that
> is processed after the first has been received with the identical tuple
> already in hash table.
>
> However, its possible that this identical tuple is a NAT_CLASH tuple.
> In that case the second skb will be sent, but no reply can be received
> since the reply that is processed first removes the NAT_CLASH tuple.
>
> Do not auto-delete, this gives a 1 second window for replies to be passed
> back to originator.
>
> Packets that are coming later (udp stream case) will not be affected:
> they match the original ct entry, not a NAT_CLASH one.
>
> Also prevent NAT_CLASH entries from getting offloaded.
Applied, thanks.
prev parent reply other threads:[~2020-08-28 16:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-25 22:07 [PATCH nf] netfilter: conntrack: do not auto-delete clash entries on reply Florian Westphal
2020-08-28 16:30 ` Pablo Neira Ayuso [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=20200828163016.GA16743@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--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).