1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 07:36:38 +02:00

Also fixed m_proxyscan to handle users with invalid ips

This commit is contained in:
Adam
2012-02-22 14:41:36 -05:00
parent 000660608e
commit bd31fbb9f0
+9 -2
View File
@@ -346,10 +346,17 @@ class ModuleProxyScan : public Module
if (exempt || !user || !Me->IsSynced() || !user->server->IsSynced())
return;
sockaddrs user_ip(user->ip);
/* At this time we only support IPv4 */
if (user_ip.sa.sa_family != AF_INET)
sockaddrs user_ip;
try
{
user_ip.pton(AF_INET, user->ip);
}
catch (const SocketException &)
{
/* User doesn't have a valid IPv4 IP (ipv6/spoof/etc) */
return;
}
if (!this->con_notice.empty() && !this->con_source.empty())
{