Skip to content

Commit a67fd55

Browse files
ummakynesFlorian Westphal
authored andcommitted
netfilter: nf_tables: remove redundant chain validation on register store
This validation predates the introduction of the state machine that determines when to enter slow path validation for error reporting. Currently, table validation is perform when: - new rule contains expressions that need validation. - new set element with jump/goto verdict. Validation on register store skips most checks with no basechains, still this walks the graph searching for loops and ensuring expressions are called from the right hook. Remove this. Fixes: a654de8 ("netfilter: nf_tables: fix chain dependency validation") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de>
1 parent 5ec8ca2 commit a67fd55

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11676,21 +11676,10 @@ static int nft_validate_register_store(const struct nft_ctx *ctx,
1167611676
enum nft_data_types type,
1167711677
unsigned int len)
1167811678
{
11679-
int err;
11680-
1168111679
switch (reg) {
1168211680
case NFT_REG_VERDICT:
1168311681
if (type != NFT_DATA_VERDICT)
1168411682
return -EINVAL;
11685-
11686-
if (data != NULL &&
11687-
(data->verdict.code == NFT_GOTO ||
11688-
data->verdict.code == NFT_JUMP)) {
11689-
err = nft_chain_validate(ctx, data->verdict.chain);
11690-
if (err < 0)
11691-
return err;
11692-
}
11693-
1169411683
break;
1169511684
default:
1169611685
if (type != NFT_DATA_VALUE)

0 commit comments

Comments
 (0)