Commit baa2d42c authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: nf_tables: use struct nft_set_iter in set element flush

Instead of struct nft_set_dump_args, remove unnecessary wrapper
structure.
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 5cb82a38
......@@ -3936,15 +3936,13 @@ static int nf_tables_delsetelem(struct net *net, struct sock *nlsk,
return -EBUSY;
if (nla[NFTA_SET_ELEM_LIST_ELEMENTS] == NULL) {
struct nft_set_dump_args args = {
.iter = {
.genmask = genmask,
.fn = nft_flush_set,
},
struct nft_set_iter iter = {
.genmask = genmask,
.fn = nft_flush_set,
};
set->ops->walk(&ctx, set, &args.iter);
set->ops->walk(&ctx, set, &iter);
return args.iter.err;
return iter.err;
}
nla_for_each_nested(attr, nla[NFTA_SET_ELEM_LIST_ELEMENTS], rem) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment