Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63283dd2 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nf_tables: skip transaction if no update flags in tables



Skip transaction handling for table updates with no changes in
the flags. This fixes a crash when passing the table flag with all
bits unset.

Reported-by: default avatarAna Rey <anarey@gmail.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent e940f5d6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -407,6 +407,9 @@ static int nf_tables_updtable(struct nft_ctx *ctx)
	if (flags & ~NFT_TABLE_F_DORMANT)
		return -EINVAL;

	if (flags == ctx->table->flags)
		return 0;

	trans = nft_trans_alloc(ctx, NFT_MSG_NEWTABLE,
				sizeof(struct nft_trans_table));
	if (trans == NULL)