]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft: cache: Check consistency with NFT_CL_FAKE, too
authorPhil Sutter <phil@nwl.cc>
Wed, 29 Jul 2020 13:39:31 +0000 (15:39 +0200)
committerPhil Sutter <phil@nwl.cc>
Fri, 21 Aug 2020 17:00:51 +0000 (19:00 +0200)
Athough this cache level fetches table names only, it shouldn't skip the
consistency check.

Fixes: f42bfb344af82 ("nft: cache: Re-establish cache consistency check")
Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/nft-cache.c

index c6baf090ae85f3d791ac9ca746d9e3a7b09731c9..32cfd6cf0989a458b6c9fe19f1223cfa5162e4e1 100644 (file)
@@ -502,14 +502,14 @@ retry:
        if (req->level >= NFT_CL_TABLES)
                fetch_table_cache(h);
        if (req->level == NFT_CL_FAKE)
-               return;
+               goto genid_check;
        if (req->level >= NFT_CL_CHAINS)
                fetch_chain_cache(h, t, chains);
        if (req->level >= NFT_CL_SETS)
                fetch_set_cache(h, t, NULL);
        if (req->level >= NFT_CL_RULES)
                fetch_rule_cache(h, t);
-
+genid_check:
        mnl_genid_get(h, &genid_check);
        if (h->nft_genid != genid_check) {
                flush_cache(h, h->cache, NULL);