ircd::net::dns::cache: Fix case sensitivities on several key mappings. (956aa7682f)

This commit is contained in:
Jason Volk 2023-04-25 20:25:03 -07:00
parent 5f0b98e5d1
commit 5f5be52fa9
2 changed files with 9 additions and 9 deletions

View File

@ -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 = {};

View File

@ -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