diff options
author | Phil Sutter <phil@nwl.cc> | 2021-03-25 16:24:39 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-04-06 10:52:42 +0200 |
commit | fdf64dcdace989589bac441805082e3b1fe6a915 (patch) | |
tree | 37fcc128d5f5c9030dc4a5ea4d377f2ef5afb3df /iptables/nft.h | |
parent | c5d9a723b5159a28f547b577711787295a14fd84 (diff) |
nft: cache: Sort chains on demand only
Mandatory sorted insert of chains into cache significantly slows down
restoring of large rulesets. Since the sorted list of user-defined
chains is needed for listing and verbose output only, introduce
nft_cache_sort_chains() and call it where needed.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/nft.h')
-rw-r--r-- | iptables/nft.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/iptables/nft.h b/iptables/nft.h index 0910f82a..4ac7e009 100644 --- a/iptables/nft.h +++ b/iptables/nft.h @@ -44,6 +44,7 @@ struct nft_cache { struct nft_chain_list *chains; struct nftnl_set_list *sets; bool exists; + bool sorted; } table[NFT_TABLE_MAX]; }; |