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

Commit 23b7ca4f authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nf_tables: fix flush after rule deletion in the same batch



Flush after rule deletion bogusly hits -ENOENT. Skip rules that have
been already from nft_delrule_by_chain() which is always called from the
flush path.

Fixes: cf9dc09d ("netfilter: nf_tables: fix missing rules flushing per table")
Reported-by: default avatarPhil Sutter <phil@nwl.cc>
Acked-by: default avatarPhil Sutter <phil@nwl.cc>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent f9bcc9f3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -313,6 +313,9 @@ static int nft_delrule_by_chain(struct nft_ctx *ctx)
	int err;

	list_for_each_entry(rule, &ctx->chain->rules, list) {
		if (!nft_is_active_next(ctx->net, rule))
			continue;

		err = nft_delrule(ctx, rule);
		if (err < 0)
			return err;