netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Dirk Morris <dmorris@metaloft.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH net v2] netfilter: Use consistent ct id hash calculation
Date: Thu, 8 Aug 2019 22:28:05 +0200	[thread overview]
Message-ID: <20190808202805.ugyzrexglauwzwgn@breakpoint.cc> (raw)
In-Reply-To: <42f0ed4e-d070-b398-44de-15c65221f30c@metaloft.com>

Dirk Morris <dmorris@metaloft.com> wrote:
> Change ct id hash calculation to only use invariants.
> 
> Currently the ct id hash calculation is based on some fields that can
> change in the lifetime on a conntrack entry in some corner cases. This
> results on the ct id change after the conntrack has been confirmed.
> This changes the hash to be based on attributes which should never
> change. Now the ct id hash is also consistent from initialization to
> conntrack confirmation either even though it is unconfirmed.

Looks good, but can you also fix up the comment at the top of this
function?  (Alternatively, delete those things that are not relevant
anymore).

Also, please add following Tag:

Fixes: 3c79107631db1f7 ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id")

perhaps also mention that hashing the full tuplehash includes
the hlist pointer address, which will change when a conntrack is placed
on the dying list -- this affects reliable delete event delivery --
on redelivery, the id will be different, so your commit is not
just an improvement, it also fixes a bug.

Thanks!

  reply	other threads:[~2019-08-08 20:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 18:30 [PATCH net v2] netfilter: Use consistent ct id hash calculation Dirk Morris
2019-08-08 20:28 ` Florian Westphal [this message]
2019-08-08 20:39   ` Dirk Morris

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=20190808202805.ugyzrexglauwzwgn@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=dmorris@metaloft.com \
    --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).