Skip to content

Commit 3b79aea

Browse files
bmastbergengregkh
authored andcommitted
netfilter: nft_ct: Remove confirmation check for NFT_CT_ID
[ Upstream commit 2d94b20 ] Since commit 656c8e9 ("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. Fixes: 656c8e9 ("netfilter: conntrack: Use consistent ct id hash calculation") Signed-off-by: Brett Mastbergen <brett.mastbergen@gmail.com> Acked-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0a652b1 commit 3b79aea

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/netfilter/nft_ct.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
177177
}
178178
#endif
179179
case NFT_CT_ID:
180-
if (!nf_ct_is_confirmed(ct))
181-
goto err;
182180
*dest = nf_ct_get_id(ct);
183181
return;
184182
default:

0 commit comments

Comments
 (0)