Skip to content

Commit 95b2dac

Browse files
ummakynesgregkh
authored andcommitted
netfilter: nf_tables: remove redundant chain validation on register store
[ Upstream commit a67fd55 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 79ea910 commit 95b2dac

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

net/netfilter/nf_tables_api.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11678,21 +11678,10 @@ static int nft_validate_register_store(const struct nft_ctx *ctx,
1167811678
enum nft_data_types type,
1167911679
unsigned int len)
1168011680
{
11681-
int err;
11682-
1168311681
switch (reg) {
1168411682
case NFT_REG_VERDICT:
1168511683
if (type != NFT_DATA_VERDICT)
1168611684
return -EINVAL;
11687-
11688-
if (data != NULL &&
11689-
(data->verdict.code == NFT_GOTO ||
11690-
data->verdict.code == NFT_JUMP)) {
11691-
err = nft_chain_validate(ctx, data->verdict.chain);
11692-
if (err < 0)
11693-
return err;
11694-
}
11695-
1169611685
break;
1169711686
default:
1169811687
if (type != NFT_DATA_VALUE)

0 commit comments

Comments
 (0)