From 3ac6d923167e387145e08b1051144991417ddf4a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 17 Dec 2022 11:26:35 +0000 Subject: Fix warning about UNIX socket connections being insecure. --- src/modules/m_spanningtree/server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_spanningtree/server.cpp b/src/modules/m_spanningtree/server.cpp index 538479ca4..054e30d5f 100644 --- a/src/modules/m_spanningtree/server.cpp +++ b/src/modules/m_spanningtree/server.cpp @@ -141,7 +141,8 @@ Link* TreeSocket::AuthRemote(const CommandBase::Params& params) ssliohook->GetCiphersuite(ciphersuite); ServerInstance->SNO->WriteToSnoMask('l', "Negotiated ciphersuite %s on link %s", ciphersuite.c_str(), x->Name.c_str()); } - else if (!irc::sockets::cidr_mask("127.0.0.0/8").match(capab->remotesa) && !irc::sockets::cidr_mask("::1/128").match(capab->remotesa)) + else if ((capab->remotesa.family() == AF_INET && !irc::sockets::cidr_mask("127.0.0.0/8").match(capab->remotesa)) + || (capab->remotesa.family() == AF_INET6 && !irc::sockets::cidr_mask("::1/128").match(capab->remotesa))) { ServerInstance->SNO->WriteGlobalSno('l', "Server connection to %s is not using SSL (TLS). This is VERY INSECURE and will not be allowed in the next major version of InspIRCd.", x->Name.c_str()); } -- cgit v1.3.1-10-gc9f91