mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-12 23:54:17 +00:00
Fixed "PrivateNetOf" function not checking for the entire B class private network range
This commit is contained in:
parent
a768d6c177
commit
620d689038
1 changed files with 2 additions and 2 deletions
|
@ -903,11 +903,11 @@ bool JoinGame (int i)
|
|||
static int PrivateNetOf(in_addr in)
|
||||
{
|
||||
int addr = ntohl(in.s_addr);
|
||||
if ((addr & 0xFFFF0000) == 0xC0A80000) // 192.168.0.0
|
||||
if ((addr & 0xFFFF0000) == 0xC0A80000) // 192.168.0.0
|
||||
{
|
||||
return 0xC0A80000;
|
||||
}
|
||||
else if ((addr & 0xFFF00000) == 0xAC100000) // 172.16.0.0
|
||||
else if ((addr & 0xFFFF0000) >= 0xAC100000 && (addr & 0xFFFF0000) <= 0xAC1F0000) // 172.16.0.0 - 172.31.0.0
|
||||
{
|
||||
return 0xAC100000;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue