From: Brett Mastbergen <brett.mastbergen@gmail.com>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nf] netfilter: nft_ct: Remove confirmation check for NFT_CT_ID
Date: Tue, 8 Dec 2020 16:39:24 -0500 [thread overview]
Message-ID: <20201208213924.3106-1-brett.mastbergen@gmail.com> (raw)
Since commit 656c8e9cc1ba ("netfilter: conntrack: Use consistent ct id
hash calculation") the ct id will not change from initialization to
confirmation. Removing the confirmation check allows for things like
adding an element to a 'typeof ct id' set in prerouting upon reception
of the first packet of a new connection, and then being able to
reference that set consistently both before and after the connection
is confirmed.
Signed-off-by: Brett Mastbergen <brett.mastbergen@gmail.com>
---
net/netfilter/nft_ct.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index 322bd674963e..a1b0aac46e9e 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -177,8 +177,6 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
}
#endif
case NFT_CT_ID:
- if (!nf_ct_is_confirmed(ct))
- goto err;
*dest = nf_ct_get_id(ct);
return;
default:
--
2.20.1
next reply other threads:[~2020-12-08 21:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 21:39 Brett Mastbergen [this message]
2020-12-08 22:09 ` [PATCH nf] netfilter: nft_ct: Remove confirmation check for NFT_CT_ID Florian Westphal
2020-12-09 9:31 ` Pablo Neira Ayuso
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=20201208213924.3106-1-brett.mastbergen@gmail.com \
--to=brett.mastbergen@gmail.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).