summaryrefslogtreecommitdiffstats
path: root/iptables/nft-cache.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-07-31 18:20:17 +0200
committerPhil Sutter <phil@nwl.cc>2020-08-14 09:04:00 +0200
commit4e3c11a6f5a94f746ed54f0ae96e8c750be1b64a (patch)
tree96f165fcfc95cdfc029c3cbcd5b3de2ef31bce37 /iptables/nft-cache.c
parentca69b0290dc509d72118f0a054a5c740cb913875 (diff)
nft: Fix for ruleset flush while restoring
If ruleset is flushed while an instance of iptables-nft-restore is running and has seen a COMMIT line once, it doesn't notice the disappeared table while handling the next COMMIT. This is due to table existence being tracked via 'initialized' boolean which is only reset by nft_table_flush(). To fix this, drop the dedicated 'initialized' boolean and switch users to the recently introduced 'exists' one. As a side-effect, this causes base chain existence being checked for each command calling nft_xt_builtin_init() as the old 'initialized' bit was used to track if that function has been called before or not. Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft-cache.c')
0 files changed, 0 insertions, 0 deletions