mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-07 07:23:13 +02:00
Fixed a maxperip and maxunknownconnectionsperip bug in IPv6
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user