@@ -891,11 +891,11 @@ static int flush_cache(struct nft_cache *c, const struct builtin_table *tables,
static void flush_chain_cache(struct nft_handle *h, const char *tablename)
{
- if (!h->have_cache)
+ if (!h->have_chain_cache)
return;
if (flush_cache(h->cache, h->tables, tablename))
- h->have_cache = false;
+ h->have_chain_cache = false;
}
void nft_fini(struct nft_handle *h)
@@ -1601,7 +1601,7 @@ retry:
mnl_genid_get(h, &genid_start);
fetch_chain_cache(h);
fetch_rule_cache(h);
- h->have_cache = true;
+ h->have_chain_cache = true;
mnl_genid_get(h, &genid_stop);
if (genid_start != genid_stop) {
@@ -1614,7 +1614,7 @@ retry:
void nft_build_cache(struct nft_handle *h)
{
- if (!h->have_cache)
+ if (!h->have_chain_cache)
__nft_build_cache(h);
}
@@ -1622,7 +1622,7 @@ void nft_fake_cache(struct nft_handle *h)
{
int i;
- if (h->have_cache)
+ if (h->have_chain_cache)
return;
/* fetch tables so conditional table delete logic works */
@@ -1639,7 +1639,7 @@ void nft_fake_cache(struct nft_handle *h)
h->cache->table[type].chains = nftnl_chain_list_alloc();
}
mnl_genid_get(h, &h->nft_genid);
- h->have_cache = true;
+ h->have_chain_cache = true;
}
static void __nft_flush_cache(struct nft_handle *h)
@@ -1654,7 +1654,7 @@ static void __nft_flush_cache(struct nft_handle *h)
static void nft_rebuild_cache(struct nft_handle *h)
{
- if (h->have_cache)
+ if (h->have_chain_cache)
__nft_flush_cache(h);
__nft_build_cache(h);
@@ -53,7 +53,7 @@ struct nft_handle {
unsigned int cache_index;
struct nft_cache __cache[2];
struct nft_cache *cache;
- bool have_cache;
+ bool have_chain_cache;
bool restore;
bool noflush;
int8_t config_done;
Prepare for optional rule cache by renaming the boolean. Signed-off-by: Phil Sutter <phil@nwl.cc> --- iptables/nft.c | 14 +++++++------- iptables/nft.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-)