mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 21:31:46 +00:00
Merge branch 'next' into gametype-refactor-1
This commit is contained in:
commit
d5791044a2
1 changed files with 4 additions and 1 deletions
|
@ -424,7 +424,7 @@ static boolean SOCK_cmpipv6(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
|
||||||
{
|
{
|
||||||
UINT8 bitmask;
|
UINT8 bitmask;
|
||||||
I_Assert(mask <= 128);
|
I_Assert(mask <= 128);
|
||||||
if (memcmp(&a->ip6.sin6_addr, &b->ip6.sin6_addr, mask / 8) != 0)
|
if (memcmp(&a->ip6.sin6_addr.s6_addr, &b->ip6.sin6_addr.s6_addr, mask / 8) != 0)
|
||||||
return false;
|
return false;
|
||||||
if (mask % 8 == 0)
|
if (mask % 8 == 0)
|
||||||
return true;
|
return true;
|
||||||
|
@ -437,6 +437,9 @@ static boolean SOCK_cmpaddr(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
|
||||||
{
|
{
|
||||||
UINT32 bitmask = INADDR_NONE;
|
UINT32 bitmask = INADDR_NONE;
|
||||||
|
|
||||||
|
if (a->any.sa_family != b->any.sa_family)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (mask && mask < 32)
|
if (mask && mask < 32)
|
||||||
bitmask = htonl((UINT32)(-1) << (32 - mask));
|
bitmask = htonl((UINT32)(-1) << (32 - mask));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue