Commit eeb6c24f authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Petr Špaček

cache: fix broken refresh of insecure records

... that were about to expire.  The effect was that predict module
started the request, but cache still didn't overwrite the record if it
wasn't secure.
parent fb9fdea8
......@@ -12,6 +12,7 @@ Bugfixes
- detect_time_jump module: don't clear cache on suspend-resume (#284)
- stats module: fix stats.list() returning nothing, regressed in 2.0.0
- policy.TLS_FORWARD: refusal when configuring with multiple IPs (#306)
- cache: fix broken refresh of insecure records that were about to expire
- fix the hints module on some systems, e.g. Fedora (came back on 2.0.0)
- build with older gnutls (conditionally disable features)
......
......@@ -164,7 +164,7 @@ int entry_h_splice(
* Stale-serving is NOT considered, but TTL 1 would be considered
* as expiring anyway, ... */
int32_t old_ttl = get_new_ttl(eh_orig, qry, NULL, 0);
if (old_ttl > 0 && !is_expiring(old_ttl, eh_orig->ttl)
if (old_ttl > 0 && !is_expiring(eh_orig->ttl, old_ttl)
&& rank <= eh_orig->rank) {
WITH_VERBOSE(qry) {
auto_free char *type_str = kr_rrtype_text(type),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment