0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-15 09:31:46 +02:00

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) ircd::net::dns::cache::operator==(const waiter &a, const waiter &b)
noexcept noexcept
{ {
return return true
a.opts.qtype == b.opts.qtype && && a.opts.qtype == b.opts.qtype
a.key && b.key && && a.key && b.key
a.key == b.key; && a.key == b.key;
} }
bool bool
@ -227,7 +227,7 @@ ircd::net::dns::cache::waiter::waiter(const hostport &hp,
{ {
opts.qtype == 33? opts.qtype == 33?
make_SRV_key(keybuf, hp, opts): make_SRV_key(keybuf, hp, opts):
strlcpy(keybuf, host(hp)) tolower(keybuf, host(hp))
} }
{ {
this->opts.srv = {}; this->opts.srv = {};

View file

@ -89,7 +89,7 @@ ircd::net::dns::cache::put(const hostport &hp,
{ {
opts.qtype == 33? opts.qtype == 33?
make_SRV_key(state_key_buf, hp, opts): make_SRV_key(state_key_buf, hp, opts):
host(hp) tolower(state_key_buf, host(hp))
}; };
return put(type, state_key, code, msg); return put(type, state_key, code, msg);
@ -117,7 +117,7 @@ ircd::net::dns::cache::put(const hostport &hp,
{ {
opts.qtype == 33? opts.qtype == 33?
make_SRV_key(state_key_buf, hp, opts): make_SRV_key(state_key_buf, hp, opts):
host(hp) tolower(state_key_buf, host(hp))
}; };
return put(type, state_key, rrs); return put(type, state_key, rrs);
@ -369,7 +369,7 @@ ircd::net::dns::cache::get(const hostport &hp,
{ {
opts.qtype == 33? opts.qtype == 33?
make_SRV_key(state_key_buf, hp, opts): make_SRV_key(state_key_buf, hp, opts):
host(hp) tolower(state_key_buf, host(hp))
}; };
const m::room::state state const m::room::state state
@ -431,7 +431,7 @@ ircd::net::dns::cache::for_each(const hostport &hp,
{ {
opts.qtype == 33? opts.qtype == 33?
make_SRV_key(state_key_buf, hp, opts): make_SRV_key(state_key_buf, hp, opts):
host(hp) tolower(state_key_buf, host(hp))
}; };
const m::room::state state const m::room::state state