diff --git a/Changes b/Changes index 277e09e26..dd695af8c 100644 --- a/Changes +++ b/Changes @@ -1320,3 +1320,4 @@ seen. gmtime warning still there than by host the hostname is still used for the u@h, unless allow::options::useip is set (idea inspired by danielek) - Fixed a bug in the new allow system reported by danielek +- Fixed a maxperip and a maxunknownconnectionsperip bug in IPv6 reported by danielek diff --git a/src/s_bsd.c b/src/s_bsd.c index fdd9b1aca..cbaa5edcf 100644 --- a/src/s_bsd.c +++ b/src/s_bsd.c @@ -1194,7 +1194,11 @@ add_con_refuse: for (i = LastSlot; i >= 0; i--) { if (local[i] && IsUnknown(local[i]) && +#ifndef INET6 local[i]->ip.S_ADDR == acptr->ip.S_ADDR) +#else + !bcmp(local[i]->ip.S_ADDR, cptr->ip.S_ADDR, sizeof(cptr->ip.S_ADDR))) +#endif { j++; if (j > MAXUNKNOWNCONNECTIONSPERIP) diff --git a/src/s_conf.c b/src/s_conf.c index 4ddb112f5..996d09855 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -3977,7 +3977,11 @@ int AllowClient(aClient *cptr, struct hostent *hp, char *sockhost) ii = 1; for (i = LastSlot; i >= 0; i--) if (local[i] && MyClient(local[i]) && +#ifndef INET6 local[i]->ip.S_ADDR == cptr->ip.S_ADDR) +#else + !bcmp(local[i]->ip.S_ADDR, cptr->ip.S_ADDR, sizeof(cptr->ip.S_ADDR))) +#endif { ii++; if (ii > aconf->maxperip)