From 24d5d53df06847e3dcfa5032612ad28b9dcadf17 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 26 May 2023 13:09:43 +0100 Subject: Make it clear that is only required for IP listeners. --- src/modules/m_spanningtree/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 7ec660288..1d396f64a 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -214,7 +214,7 @@ void SpanningTreeUtilities::RefreshIPCache() bool isunix = L->IPAddr.find('/') != std::string::npos; if (!L->Port && !isunix) { - ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Ignoring a link block without a port."); + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Ignoring an IP link block without a port."); /* Invalid link block */ continue; } -- cgit v1.3.1-10-gc9f91 From e607175dfa8e53d35964e5f650babb597c1c72b5 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 28 May 2023 11:53:53 +0100 Subject: Fix ssl_openssl on OpenSSL versions older than 1.1.1. Fixes a regression introduced in commit eba5cb9dc9. --- src/modules/extra/m_ssl_openssl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 0e26bf1b4..b5fabdb3a 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -704,6 +704,10 @@ class OpenSSLIOHook : public SSLIOHook certinfo->activation = GetTime(X509_getm_notBefore(cert)); certinfo->expiration = GetTime(X509_getm_notAfter(cert)); +#if OPENSSL_VERSION_NUMBER < 0x10101000L +# define ASN1_TIME_cmp_time_t ASN1_UTCTIME_cmp_time_t +#endif + int activated = ASN1_TIME_cmp_time_t(X509_getm_notBefore(cert), ServerInstance->Time()); if (activated != -1 && activated != 0) certinfo->error = "Certificate not activated"; -- cgit v1.3.1-10-gc9f91 From 3ac627f3ba4a2dc0bd33f93e2024710c1de0fc57 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 29 May 2023 18:58:02 +0100 Subject: If no DNS bindport is specified then randomise it on rehash. --- src/coremods/core_dns.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index ed0b4a7b2..b6cd456ec 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -882,7 +882,7 @@ class ModuleDNS : public Module if (DNSServer.empty()) FindDNSServer(); - if (oldserver != DNSServer || oldip != SourceIP || oldport != SourcePort) + if (oldserver != DNSServer || oldip != SourceIP || oldport != SourcePort || !SourcePort) this->manager.Rehash(DNSServer, SourceIP, SourcePort); } -- cgit v1.3.1-10-gc9f91 From 92ba1f3f79b7fe8e600a6473feb83b3018995a01 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 29 May 2023 22:56:33 +0100 Subject: Log when a server sends an unexpected command post-authentication. --- src/modules/m_spanningtree/treesocket2.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 04bf6b9df..35d8703db 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -190,6 +190,11 @@ void TreeSocket::ProcessLine(std::string &line) { this->Capab(params); } + else + { + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Unknown command from fd %d in the WAIT_AUTH_2 phase: %s", + GetFd(), command.c_str()); + } break; case CONNECTING: @@ -212,7 +217,13 @@ void TreeSocket::ProcessLine(std::string &line) { this->Capab(params); } + else + { + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Unknown command from fd %d in the CONNECTING phase: %s", + GetFd(), command.c_str()); + } break; + case CONNECTED: /* * State CONNECTED: @@ -221,6 +232,7 @@ void TreeSocket::ProcessLine(std::string &line) */ this->ProcessConnectedLine(tags, prefix, command, params); break; + case DYING: break; } -- cgit v1.3.1-10-gc9f91