access: fix infinite loop bug in ipv6 check
Thanks to BtBN for spotting this (though it was his code!).
This commit is contained in:
parent
4dd787640f
commit
8d2da9389d
1 changed files with 3 additions and 1 deletions
|
@ -203,11 +203,13 @@ netmask_verify(access_entry_t *ae, struct sockaddr *src)
|
|||
while(slen >= 8)
|
||||
{
|
||||
if(a8[apos] != m8[apos])
|
||||
continue;
|
||||
break;
|
||||
|
||||
apos += 1;
|
||||
slen -= 8;
|
||||
}
|
||||
if(slen >= 8)
|
||||
continue;
|
||||
|
||||
if(slen == 0 || (a8[apos] & lastMask) == (m8[apos] & lastMask))
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue