summaryrefslogtreecommitdiffstats
path: root/lib/cache
diff options
context:
space:
mode:
authorTomas Krizek <tomas.krizek@nic.cz>2021-12-17 17:05:33 +0100
committerTomas Krizek <tomas.krizek@nic.cz>2021-12-21 15:02:09 +0100
commit4df10646f5820c37a20e6511be2d4965ecaaf9f7 (patch)
tree2736f266abf44bf2d55c5f08c58b14f05bc1429f /lib/cache
parentlua: set_extended_error() func for kr_request (diff)
downloadknot-resolver-4df10646f5820c37a20e6511be2d4965ecaaf9f7.tar.xz
knot-resolver-4df10646f5820c37a20e6511be2d4965ecaaf9f7.zip
ede: mark every error with a unique tag
To allow for easier debugging, each origin of an extended DNS error has a unique 4-byte identifier that is included in the extra_text message. The identifiers are random 4-letter base32 strings, generated with: base32 /dev/random | head -c 4
Diffstat (limited to 'lib/cache')
-rw-r--r--lib/cache/api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cache/api.c b/lib/cache/api.c
index 6421c66e..6a572b03 100644
--- a/lib/cache/api.c
+++ b/lib/cache/api.c
@@ -241,7 +241,7 @@ int32_t get_new_ttl(const struct entry_h *entry, const struct kr_query *qry,
VERBOSE_MSG(qry, "responding with stale answer\n");
/* LATER: Perhaps we could use a more specific Stale
* NXDOMAIN Answer code for applicable responses. */
- kr_request_set_extended_error(qry->request, KNOT_EDNS_EDE_STALE, NULL);
+ kr_request_set_extended_error(qry->request, KNOT_EDNS_EDE_STALE, "6Q6X");
return res_stale;
}
}