mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd::server: Prevent loopbacking at peer::open_links() stage.
This commit is contained in:
parent
2115bf7cf4
commit
7c69eda4a6
1 changed files with 8 additions and 0 deletions
|
@ -1414,6 +1414,14 @@ void
|
|||
ircd::server::peer::open_links()
|
||||
try
|
||||
{
|
||||
if(unlikely(is_loop(open_opts.ipport)))
|
||||
if(!my_host(server_name(open_opts)))
|
||||
throw unavailable
|
||||
{
|
||||
"Won't open loopback for remote host '%s'",
|
||||
server_name(open_opts),
|
||||
};
|
||||
|
||||
// The hostname in open_opts should still reference this object's string.
|
||||
assert(host(open_opts.hostport).data() == this->hostcanon.data());
|
||||
|
||||
|
|
Loading…
Reference in a new issue