1
0
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:
Bram Matthys
2026-05-13 08:30:45 +02:00
parent 4c0d830ae1
commit 31b43dcb08
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -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.
+4 -3
View File
@@ -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);
} }
} }