Unverified Commit e6bba81b authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents fec89e2f e82e08e8
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -4702,6 +4702,16 @@ void nft_data_hold(const struct nft_data *data, enum nft_data_types type)
	}
}

static int nft_setelem_active_next(const struct net *net,
				   const struct nft_set *set,
				   struct nft_set_elem *elem)
{
	const struct nft_set_ext *ext = nft_set_elem_ext(set, elem->priv);
	u8 genmask = nft_genmask_next(net);

	return nft_set_elem_active(ext, genmask);
}

static void nft_set_elem_activate(const struct net *net,
				  const struct nft_set *set,
				  struct nft_set_elem *elem)
@@ -6806,8 +6816,10 @@ static int __nf_tables_abort(struct net *net)
		case NFT_MSG_DELSETELEM:
			te = (struct nft_trans_elem *)trans->data;

			if (!nft_setelem_active_next(net, te->set, &te->elem)) {
				nft_set_elem_activate(net, te->set, &te->elem);
				te->set->ops->activate(net, te->set, &te->elem);
			}
			te->set->ndeact--;

			nft_trans_destroy(trans);