]> git.ipfire.org Git - thirdparty/iptables.git/commit
nft: Extend use of nftnl_chain_list_foreach()
authorPhil Sutter <phil@nwl.cc>
Wed, 8 Jul 2020 14:46:14 +0000 (16:46 +0200)
committerPhil Sutter <phil@nwl.cc>
Fri, 21 Aug 2020 17:00:56 +0000 (19:00 +0200)
commit79ada320d0cca026f199ae8f39737c1e95991615
treed742aefe5f97b627c5f721575f9c290d7a3ebfd5
parentb531365ce32f386d91c6a0bbc80ec4076e4babdd
nft: Extend use of nftnl_chain_list_foreach()

Make use of the callback-based iterator in nft_rule_list(),
nft_rule_list_save(), nft_rule_flush() and nft_rule_save().

Callback code for nft_rule_list() and nft_rule_list_save is pretty
similar, so introduce and use a common callback function.

For nft_rule_save(), turn nft_chain_save_rules() into a callback - it is
not used anywhere else, anyway.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/nft.c