From: Yorgos Thessalonikefs Date: Mon, 24 Feb 2025 13:47:13 +0000 (+0100) Subject: - Fix hash calculation for cachedb to ignore case. Previously, cached X-Git-Tag: release-1.23.0rc1~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5c54862617c5ea2389736156fb84ad7efb73df8;p=thirdparty%2Funbound.git - Fix hash calculation for cachedb to ignore case. Previously, cached records there were only relevant for same case queries (if not already in Unbound's internal cache). --- diff --git a/cachedb/cachedb.c b/cachedb/cachedb.c index eca3b7cb7..bdb1754e4 100644 --- a/cachedb/cachedb.c +++ b/cachedb/cachedb.c @@ -47,6 +47,7 @@ #include "util/regional.h" #include "util/net_help.h" #include "util/config_file.h" +#include "util/data/dname.h" #include "util/data/msgreply.h" #include "util/data/msgencode.h" #include "services/cache/dns.h" @@ -341,6 +342,7 @@ calc_hash(struct query_info* qinfo, struct module_env* env, char* buf, /* copy the hash info into the clear buffer */ if(clen + qinfo->qname_len < sizeof(clear)) { memmove(clear+clen, qinfo->qname, qinfo->qname_len); + query_dname_tolower(clear+clen); clen += qinfo->qname_len; } if(clen + 4 < sizeof(clear)) { diff --git a/doc/Changelog b/doc/Changelog index 7ed4c031b..330d9145b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,8 @@ +24 February 2025: Yorgos + - Fix hash calculation for cachedb to ignore case. Previously, cached + records there were only relevant for same case queries (if not + already in Unbound's internal cache). + 19 February 2025: Yorgos - Fix static analysis report about unhandled EOF on error conditions when reading anchor key files.