Skip to content

Commit b9850ec

Browse files
author
Paolo Abeni
committed
Merge tag 'nf-23-05-03' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf
Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains one Netfilter fix: 1) Restore 'ct state untracked' matching with CONFIG_RETPOLINE=y, from Florian Westphal. * tag 'nf-23-05-03' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: fix ct untracked match breakage ==================== Link: https://lore.kernel.org/r/20230503201143.12310-1-pablo@netfilter.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2 parents 6a34172 + f057b63 commit b9850ec

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

net/netfilter/nft_ct_fast.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ void nft_ct_get_fast_eval(const struct nft_expr *expr,
1515
unsigned int state;
1616

1717
ct = nf_ct_get(pkt->skb, &ctinfo);
18-
if (!ct) {
19-
regs->verdict.code = NFT_BREAK;
20-
return;
21-
}
2218

2319
switch (priv->key) {
2420
case NFT_CT_STATE:
@@ -30,6 +26,16 @@ void nft_ct_get_fast_eval(const struct nft_expr *expr,
3026
state = NF_CT_STATE_INVALID_BIT;
3127
*dest = state;
3228
return;
29+
default:
30+
break;
31+
}
32+
33+
if (!ct) {
34+
regs->verdict.code = NFT_BREAK;
35+
return;
36+
}
37+
38+
switch (priv->key) {
3339
case NFT_CT_DIRECTION:
3440
nft_reg_store8(dest, CTINFO2DIR(ctinfo));
3541
return;

0 commit comments

Comments
 (0)