]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
cache: don't change kr_layer_t::state to _DONE cache-done
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 8 Jan 2021 13:47:18 +0000 (14:47 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 8 Jan 2021 19:27:29 +0000 (20:27 +0100)
commit80fdb57e88851179b49c0f4a8e97049a7285e0ca
tree012975ba238e32833a20b3497127c2afbf3a95bf
parent7c776dff2f93bcb1dba97a9a0a19307f3296ab87
cache: don't change kr_layer_t::state to _DONE

I suspect this might've caused real-life issues in some edge case,
making a cached CNAME not being followed.  But in any case,
cache is not a good place to set KR_STATE_DONE, as it only creates
a (pseudo-)packed for immediate CONSUME phase; it should be
iterator who sets it in that later phase when picking those records.

I added unnecessary simplifications to code, too (all those returns).
lib/cache/api.c
lib/cache/peek.c