From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, richard@nod.at
Subject: Re: [PATCH nf-next,RFC 2/3] netfilter: ctnetlink: use 64-bit conntrack ID
Date: Tue, 28 Nov 2017 16:45:09 +0100 [thread overview]
Message-ID: <20171128154509.GB1444@salvia> (raw)
In-Reply-To: <20171128121206.GG23412@breakpoint.cc>
On Tue, Nov 28, 2017 at 01:12:06PM +0100, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > static int ctnetlink_flush_conntrack(struct net *net,
> > @@ -1174,6 +1177,13 @@ static int ctnetlink_del_conntrack(struct net *net, struct sock *ctnl,
> > nf_ct_put(ct);
> > return -ENOENT;
> > }
> > + } else if (cda[CTA_ID64]) {
> > + u64 id = ntohl(nla_get_be64(cda[CTA_ID64]));
>
> be64_to_cpu()?
>
> But at this point we already uniquely identified the conntrack entry
> so the ID check appears to be unneeded?
>
> I never understood existing test either, so this remark isn't specific
> to your patch.
When the ID was incremental, not a memory address, you could use it to
specifically refer to a conntrack through tuple + id.
If a conntrack with tuple X is gone, then created again, you refer to
the right object.
next prev parent reply other threads:[~2017-11-28 15:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 2:13 [PATCH nf-next,RFC 1/3] netfilter: nf_conntrack: add 64-bit conntrack ID extension Pablo Neira Ayuso
2017-11-28 2:13 ` [PATCH nf-next,RFC 2/3] netfilter: ctnetlink: use 64-bit conntrack ID Pablo Neira Ayuso
2017-11-28 12:12 ` Florian Westphal
2017-11-28 15:45 ` Pablo Neira Ayuso [this message]
2017-11-28 20:27 ` Florian Westphal
2017-11-28 2:13 ` [PATCH nf-next,RFC 3/3] netfilter: ctnetlink: randomize 32-bit ID Pablo Neira Ayuso
2017-11-28 12:18 ` Florian Westphal
2017-11-28 15:46 ` Pablo Neira Ayuso
2017-11-28 10:54 ` [PATCH nf-next,RFC 1/3] netfilter: nf_conntrack: add 64-bit conntrack ID extension Florian Westphal
2017-11-28 15:44 ` Pablo Neira Ayuso
2017-11-28 20:43 ` Florian Westphal
2017-11-28 12:16 ` Florian Westphal
2017-11-28 15:57 ` Pablo Neira Ayuso
2017-11-28 20:44 ` Florian Westphal
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=20171128154509.GB1444@salvia \
--to=pablo@netfilter.org \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=richard@nod.at \
/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).