From 31b43dcb08695ff065ed96bfe54d26f8f3df7ef7 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Wed, 13 May 2026 08:30:45 +0200 Subject: [PATCH] Fix CONNTHROTTLE_CHECK and use / in 'STATS maxperip' just like we do in 'STATS connthrottle'. --- src/modules/connthrottle.c | 2 +- src/modules/maxperip.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/connthrottle.c b/src/modules/connthrottle.c index 540a2f864..fc8e84d6c 100644 --- a/src/modules/connthrottle.c +++ b/src/modules/connthrottle.c @@ -86,7 +86,7 @@ RPC_CALL_FUNC(rpc_connthrottle_reset); #ifdef DEBUGMODE /** Self-check of IPv6 CIDR limits every msec */ -#define 1 1000 +#define CONNTHROTTLE_CHECK 1000 #endif /* Per-client classification stored in our ModData slot. diff --git a/src/modules/maxperip.c b/src/modules/maxperip.c index 9f193b54b..2bc5e507b 100644 --- a/src/modules/maxperip.c +++ b/src/modules/maxperip.c @@ -475,11 +475,12 @@ int stats_maxperip(Client *client, const char *para) { 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) ip = ""; - sendtxtnumeric(client, "IPv6 #%d %s: %d local / %d global", - i, ip, e->local_clients, e->global_clients); + sendtxtnumeric(client, "IPv6 #%d %s/%d: %d local / %d global", + i, ip, iConf.default_ipv6_clone_mask, + e->local_clients, e->global_clients); } }