From: Phil Sutter Date: Fri, 7 Jun 2019 17:21:20 +0000 (+0200) Subject: src: Make cache_is_complete() public X-Git-Tag: v0.9.1~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eecfd96ea3ca8207a1fc28cd1e845c177be59d85;p=thirdparty%2Fnftables.git src: Make cache_is_complete() public Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- diff --git a/include/rule.h b/include/rule.h index 87b440b6..8ccdc2e1 100644 --- a/include/rule.h +++ b/include/rule.h @@ -639,6 +639,7 @@ extern int cache_update(struct nft_ctx *ctx, enum cmd_ops cmd, extern void cache_flush(struct nft_ctx *ctx, enum cmd_ops cmd, struct list_head *msgs); extern void cache_release(struct nft_cache *cache); +extern bool cache_is_complete(struct nft_cache *cache, enum cmd_ops cmd); struct timeout_protocol { uint32_t array_size; diff --git a/src/rule.c b/src/rule.c index 20fe6f37..ad549b1e 100644 --- a/src/rule.c +++ b/src/rule.c @@ -232,7 +232,7 @@ static int cache_completeness(enum cmd_ops cmd) return 1; } -static bool cache_is_complete(struct nft_cache *cache, enum cmd_ops cmd) +bool cache_is_complete(struct nft_cache *cache, enum cmd_ops cmd) { return cache_completeness(cache->cmd) >= cache_completeness(cmd); }