diff options
author | Phil Sutter <phil@nwl.cc> | 2020-04-07 14:05:34 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-05-11 14:28:28 +0200 |
commit | 6d1d5aa5c93eca890e28b508ef426b7844caf2b7 (patch) | |
tree | df9e2d692c8344a37ba5f4a41968704ee97c81e3 /iptables/nft.h | |
parent | b301f2ed198804015c4434f925c75e0bd224c4ef (diff) |
nft: cache: Introduce struct nft_cache_req
This embedded struct collects cache requirement info gathered from parsed
nft_cmds and is interpreted by __nft_build_cache().
While being at it, remove unused parameters passed to the latter
function, nft_handle pointer is sufficient.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/nft.h')
-rw-r--r-- | iptables/nft.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/iptables/nft.h b/iptables/nft.h index 89c3620e..c6aece7d 100644 --- a/iptables/nft.h +++ b/iptables/nft.h @@ -71,6 +71,10 @@ enum obj_update_type { NFT_COMPAT_TABLE_NEW, }; +struct nft_cache_req { + enum nft_cache_level level; +}; + struct nft_handle { int family; struct mnl_socket *nl; @@ -89,7 +93,7 @@ struct nft_handle { unsigned int cache_index; struct nft_cache __cache[2]; struct nft_cache *cache; - enum nft_cache_level cache_level; + struct nft_cache_req cache_req; bool restore; bool noflush; int8_t config_done; |