summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp9
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp9
2 files changed, 18 insertions, 0 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 1372fb2df..1b9139867 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -160,6 +160,15 @@ class ModuleSSLGnuTLS : public Module
std::string port = Conf->ReadValue("bind", "port", index);
std::string addr = Conf->ReadValue("bind", "address", index);
+ if (!addr.empty())
+ {
+ // normalize address, important for IPv6
+ int portint = 0;
+ irc::sockets::sockaddrs bin;
+ if (irc::sockets::aptosa(addr.c_str(), portint, &bin))
+ irc::sockets::satoap(addr, portint, &bin);
+ }
+
irc::portparser portrange(port, false);
long portno = -1;
while ((portno = portrange.GetToken()))
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 7295274e8..b9e23ba0b 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -182,6 +182,15 @@ class ModuleSSLOpenSSL : public Module
std::string port = Conf.ReadValue("bind", "port", index);
std::string addr = Conf.ReadValue("bind", "address", index);
+ if (!addr.empty())
+ {
+ // normalize address, important for IPv6
+ int portint = 0;
+ irc::sockets::sockaddrs bin;
+ if (irc::sockets::aptosa(addr.c_str(), portint, &bin))
+ irc::sockets::satoap(addr, portint, &bin);
+ }
+
irc::portparser portrange(port, false);
long portno = -1;
while ((portno = portrange.GetToken()))