* [PATCH net 0/1] Netfilter fixes for net
@ 2023-05-03 20:11 Pablo Neira Ayuso
2023-05-03 20:11 ` [PATCH net 1/1] netfilter: nf_tables: fix ct untracked match breakage Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2023-05-03 20:11 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev, kuba, pabeni, edumazet
Hi,
The following patchset contains one Netfilter fix:
1) Restore 'ct state untracked' matching with CONFIG_RETPOLINE=y,
from Florian Westphal.
Please, pull these changes from:
git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
Thanks.
----------------------------------------------------------------
The following changes since commit 6a341729fb31b4c5df9f74f24b4b1c98410c9b87:
af_packet: Don't send zero-byte data in packet_sendmsg_spkt(). (2023-05-03 09:20:18 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git nf-23-05-03
for you to fetch changes up to f057b63bc11d86a98176de31b437e46789f44d8f:
netfilter: nf_tables: fix ct untracked match breakage (2023-05-03 13:49:08 +0200)
----------------------------------------------------------------
netfilter pull request 23-05-03
----------------------------------------------------------------
Florian Westphal (1):
netfilter: nf_tables: fix ct untracked match breakage
net/netfilter/nft_ct_fast.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net 1/1] netfilter: nf_tables: fix ct untracked match breakage
2023-05-03 20:11 [PATCH net 0/1] Netfilter fixes for net Pablo Neira Ayuso
@ 2023-05-03 20:11 ` Pablo Neira Ayuso
2023-05-04 9:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2023-05-03 20:11 UTC (permalink / raw)
To: netfilter-devel; +Cc: davem, netdev, kuba, pabeni, edumazet
From: Florian Westphal <fw@strlen.de>
"ct untracked" no longer works properly due to erroneous NFT_BREAK.
We have to check ctinfo enum first.
Fixes: d9e789147605 ("netfilter: nf_tables: avoid retpoline overhead for some ct expression calls")
Reported-by: Rvfg <i@rvf6.com>
Link: https://marc.info/?l=netfilter&m=168294996212038&w=2
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nft_ct_fast.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/net/netfilter/nft_ct_fast.c b/net/netfilter/nft_ct_fast.c
index 89983b0613fa..e684c8a91848 100644
--- a/net/netfilter/nft_ct_fast.c
+++ b/net/netfilter/nft_ct_fast.c
@@ -15,10 +15,6 @@ void nft_ct_get_fast_eval(const struct nft_expr *expr,
unsigned int state;
ct = nf_ct_get(pkt->skb, &ctinfo);
- if (!ct) {
- regs->verdict.code = NFT_BREAK;
- return;
- }
switch (priv->key) {
case NFT_CT_STATE:
@@ -30,6 +26,16 @@ void nft_ct_get_fast_eval(const struct nft_expr *expr,
state = NF_CT_STATE_INVALID_BIT;
*dest = state;
return;
+ default:
+ break;
+ }
+
+ if (!ct) {
+ regs->verdict.code = NFT_BREAK;
+ return;
+ }
+
+ switch (priv->key) {
case NFT_CT_DIRECTION:
nft_reg_store8(dest, CTINFO2DIR(ctinfo));
return;
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net 1/1] netfilter: nf_tables: fix ct untracked match breakage
2023-05-03 20:11 ` [PATCH net 1/1] netfilter: nf_tables: fix ct untracked match breakage Pablo Neira Ayuso
@ 2023-05-04 9:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-04 9:10 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel, davem, netdev, kuba, pabeni, edumazet
Hello:
This patch was applied to netdev/net.git (main)
by Pablo Neira Ayuso <pablo@netfilter.org>:
On Wed, 3 May 2023 22:11:43 +0200 you wrote:
> From: Florian Westphal <fw@strlen.de>
>
> "ct untracked" no longer works properly due to erroneous NFT_BREAK.
> We have to check ctinfo enum first.
>
> Fixes: d9e789147605 ("netfilter: nf_tables: avoid retpoline overhead for some ct expression calls")
> Reported-by: Rvfg <i@rvf6.com>
> Link: https://marc.info/?l=netfilter&m=168294996212038&w=2
> Signed-off-by: Florian Westphal <fw@strlen.de>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
>
> [...]
Here is the summary with links:
- [net,1/1] netfilter: nf_tables: fix ct untracked match breakage
https://git.kernel.org/netdev/net/c/f057b63bc11d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-04 9:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-03 20:11 [PATCH net 0/1] Netfilter fixes for net Pablo Neira Ayuso
2023-05-03 20:11 ` [PATCH net 1/1] netfilter: nf_tables: fix ct untracked match breakage Pablo Neira Ayuso
2023-05-04 9:10 ` patchwork-bot+netdevbpf
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).