diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-01-18 18:30:08 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-02-08 14:16:18 +0100 |
commit | baa2d42cff088d9f962697a10e0345b444c8c409 (patch) | |
tree | e2750c8ae13b404f043e20ec541d6986eaafad33 /net | |
parent | 5cb82a38c6b5152b1deaba0c1596ce63222a4710 (diff) | |
download | op-kernel-dev-baa2d42cff088d9f962697a10e0345b444c8c409.zip op-kernel-dev-baa2d42cff088d9f962697a10e0345b444c8c409.tar.gz |
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: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_tables_api.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 3643ce3..790ffed 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -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) { |