diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2022-02-11 11:44:00 +0100 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2023-06-12 10:32:27 +0200 |
commit | f14a30d3e4ea0c5eecc39ff98dd6aaf5d65d8128 (patch) | |
tree | 9f8865dcfa99571ed236d453ce9c915b223dc01e /lib/cache | |
parent | new policy engine - prototype (diff) | |
download | knot-resolver-f14a30d3e4ea0c5eecc39ff98dd6aaf5d65d8128.tar.xz knot-resolver-f14a30d3e4ea0c5eecc39ff98dd6aaf5d65d8128.zip |
make policy.PASS also affect the new-policy rules
Diffstat (limited to 'lib/cache')
-rw-r--r-- | lib/cache/api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/cache/api.c b/lib/cache/api.c index 501d6839..804de6f8 100644 --- a/lib/cache/api.c +++ b/lib/cache/api.c @@ -340,12 +340,14 @@ int cache_peek(kr_layer_t *ctx, knot_pkt_t *pkt) /* TODO: we _might_ want to process rules here even when some of the cache * exit-conditions happen, though I don't expect these cases to be important. */ - int ret = kr_rule_local_data_answer(qry, pkt); - if (ret != -ENOENT) { - return ret; + if (!req->options.PASSTHRU_LEGACY) { + int ret = kr_rule_local_data_answer(qry, pkt); + if (ret != -ENOENT) { + return ret; + } } - ret = peek_nosync(ctx, pkt); + int ret = peek_nosync(ctx, pkt); kr_cache_commit(&req->ctx->cache); return ret; } |