All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf-next 1/2] netfilter: nf_tables: skip register jump/goto validation for non-base chain
@ 2025-11-18 23:50 Pablo Neira Ayuso
  2025-11-18 23:50 ` [PATCH nf-next 2/2] netfilter: nfnetlink: bail out batch processing with EMLINK Pablo Neira Ayuso
  2025-11-19  0:04 ` [PATCH nf-next 1/2] netfilter: nf_tables: skip register jump/goto validation for non-base chain Florian Westphal
  0 siblings, 2 replies; 6+ messages in thread
From: Pablo Neira Ayuso @ 2025-11-18 23:50 UTC (permalink / raw)
  To: netfilter-devel

Validating a non-base chain for each register store slows down
validation unnecessarily, remove it.

Fixes: a654de8fdc18 ("netfilter: nf_tables: fix chain dependency validation")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nf_tables_api.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 6f35f0b7a33c..bef95cede7b5 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -11846,6 +11846,9 @@ static int nft_validate_register_store(const struct nft_ctx *ctx,
 		if (data != NULL &&
 		    (data->verdict.code == NFT_GOTO ||
 		     data->verdict.code == NFT_JUMP)) {
+			if (!nft_is_base_chain(ctx->chain))
+				break;
+
 			err = nft_chain_validate(ctx, data->verdict.chain);
 			if (err < 0)
 				return err;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-19  0:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18 23:50 [PATCH nf-next 1/2] netfilter: nf_tables: skip register jump/goto validation for non-base chain Pablo Neira Ayuso
2025-11-18 23:50 ` [PATCH nf-next 2/2] netfilter: nfnetlink: bail out batch processing with EMLINK Pablo Neira Ayuso
2025-11-19  0:09   ` Florian Westphal
2025-11-19  0:32     ` Pablo Neira Ayuso
2025-11-19  0:04 ` [PATCH nf-next 1/2] netfilter: nf_tables: skip register jump/goto validation for non-base chain Florian Westphal
2025-11-19  0:27   ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.