diff options
author | Phil Sutter <phil@nwl.cc> | 2020-07-08 15:18:48 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-07-24 19:16:09 +0200 |
commit | db3a63237fe21de8a75eaaddf0cc577ce30a68fe (patch) | |
tree | 95a3f9cce07890784feaf4b7a5892a860679f5f8 /iptables/xtables-save.c | |
parent | 7a700c47fe121c65c550ab24de3284abbb1e82f8 (diff) |
nft: Turn nft_chain_save() into a foreach-callback
Let nftnl_chain_list_foreach() do the chain list iterating instead of
open-coding it. While being at it, simplify the policy value selection
code as well.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-save.c')
-rw-r--r-- | iptables/xtables-save.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/xtables-save.c b/iptables/xtables-save.c index bb3d8cd3..92b0c911 100644 --- a/iptables/xtables-save.c +++ b/iptables/xtables-save.c @@ -92,7 +92,7 @@ __do_output(struct nft_handle *h, const char *tablename, void *data) printf("*%s\n", tablename); /* Dump out chain names first, * thereby preventing dependency conflicts */ - nft_chain_save(h, chain_list); + nftnl_chain_list_foreach(chain_list, nft_chain_save, h); nft_rule_save(h, tablename, d->format); if (d->commit) printf("COMMIT\n"); |