diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-05-28 18:48:19 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-05-28 23:54:44 +0200 |
commit | 01e25e264a4c4872fc0b1b50b4ee83768e7c0248 (patch) | |
tree | 5c52548fb5d7ae1c438d7e466d388eb12f3e333c /iptables/xtables-restore.c | |
parent | 8d190e98564f0ed119f14444367970b7a4ecd7d2 (diff) |
xtables: add chain cache
So we don't have to dump the chain cache content over and over again.
Moreover, perform incremental updates on the chain cache to add and to
delete non-base chains.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/xtables-restore.c')
-rw-r--r-- | iptables/xtables-restore.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c index 6cd4de23..3270ec02 100644 --- a/iptables/xtables-restore.c +++ b/iptables/xtables-restore.c @@ -169,7 +169,7 @@ static struct nftnl_chain_list *get_chain_list(struct nft_handle *h) { struct nftnl_chain_list *chain_list; - chain_list = nft_chain_dump(h, NULL); + chain_list = nft_chain_dump(h); if (chain_list == NULL) xtables_error(OTHER_PROBLEM, "cannot retrieve chain list\n"); @@ -449,9 +449,6 @@ void xtables_restore_parse(struct nft_handle *h, xt_params->program_name, line + 1); exit(1); } - - if (chain_list) - nftnl_chain_list_free(chain_list); } static int |