mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 17:14:46 +02:00
Fix CONNTHROTTLE_CHECK and use <addr>/<prefix> in 'STATS maxperip'
just like we do in 'STATS connthrottle'.
This commit is contained in:
@@ -86,7 +86,7 @@ RPC_CALL_FUNC(rpc_connthrottle_reset);
|
|||||||
|
|
||||||
#ifdef DEBUGMODE
|
#ifdef DEBUGMODE
|
||||||
/** Self-check of IPv6 CIDR limits every <this> msec */
|
/** Self-check of IPv6 CIDR limits every <this> msec */
|
||||||
#define 1 1000
|
#define CONNTHROTTLE_CHECK 1000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Per-client classification stored in our ModData slot.
|
/* Per-client classification stored in our ModData slot.
|
||||||
|
|||||||
@@ -475,11 +475,12 @@ int stats_maxperip(Client *client, const char *para)
|
|||||||
{
|
{
|
||||||
for (e = IpUsersHash_ipv6[i]; e; e = e->next)
|
for (e = IpUsersHash_ipv6[i]; e; e = e->next)
|
||||||
{
|
{
|
||||||
ip = inetntop(AF_INET6, e->rawip, ipbuf, sizeof(ipbuf));
|
ip = inet_ntop(AF_INET6, e->rawip, ipbuf, sizeof(ipbuf));
|
||||||
if (!ip)
|
if (!ip)
|
||||||
ip = "<invalid>";
|
ip = "<invalid>";
|
||||||
sendtxtnumeric(client, "IPv6 #%d %s: %d local / %d global",
|
sendtxtnumeric(client, "IPv6 #%d %s/%d: %d local / %d global",
|
||||||
i, ip, e->local_clients, e->global_clients);
|
i, ip, iConf.default_ipv6_clone_mask,
|
||||||
|
e->local_clients, e->global_clients);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user