diff --git a/ircd/net_dns_cache.cc b/ircd/net_dns_cache.cc index 50edca662..9c6e7469d 100644 --- a/ircd/net_dns_cache.cc +++ b/ircd/net_dns_cache.cc @@ -191,10 +191,10 @@ bool ircd::net::dns::cache::operator==(const waiter &a, const waiter &b) noexcept { - return - a.opts.qtype == b.opts.qtype && - a.key && b.key && - a.key == b.key; + return true + && a.opts.qtype == b.opts.qtype + && a.key && b.key + && a.key == b.key; } bool @@ -227,7 +227,7 @@ ircd::net::dns::cache::waiter::waiter(const hostport &hp, { opts.qtype == 33? make_SRV_key(keybuf, hp, opts): - strlcpy(keybuf, host(hp)) + tolower(keybuf, host(hp)) } { this->opts.srv = {}; diff --git a/modules/net_dns_cache.cc b/modules/net_dns_cache.cc index 454910b5c..3afe12312 100644 --- a/modules/net_dns_cache.cc +++ b/modules/net_dns_cache.cc @@ -89,7 +89,7 @@ ircd::net::dns::cache::put(const hostport &hp, { opts.qtype == 33? make_SRV_key(state_key_buf, hp, opts): - host(hp) + tolower(state_key_buf, host(hp)) }; return put(type, state_key, code, msg); @@ -117,7 +117,7 @@ ircd::net::dns::cache::put(const hostport &hp, { opts.qtype == 33? make_SRV_key(state_key_buf, hp, opts): - host(hp) + tolower(state_key_buf, host(hp)) }; return put(type, state_key, rrs); @@ -369,7 +369,7 @@ ircd::net::dns::cache::get(const hostport &hp, { opts.qtype == 33? make_SRV_key(state_key_buf, hp, opts): - host(hp) + tolower(state_key_buf, host(hp)) }; const m::room::state state @@ -431,7 +431,7 @@ ircd::net::dns::cache::for_each(const hostport &hp, { opts.qtype == 33? make_SRV_key(state_key_buf, hp, opts): - host(hp) + tolower(state_key_buf, host(hp)) }; const m::room::state state