mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: network: fix IPv4 private address checks according to RFC1918
Thanks to @Mr0maks for the fix
This commit is contained in:
parent
3c682507e7
commit
3e1db432df
@ -616,7 +616,7 @@ qboolean NET_IsReservedAdr( netadr_t a )
|
||||
|
||||
if( a.type == NA_IP )
|
||||
{
|
||||
if( a.ip[0] == 10 || a.ip[0] == 127 )
|
||||
if( a.ip[0] == 10 )
|
||||
return true;
|
||||
|
||||
if( a.ip[0] == 172 && a.ip[1] >= 16 )
|
||||
@ -626,7 +626,7 @@ qboolean NET_IsReservedAdr( netadr_t a )
|
||||
return true;
|
||||
}
|
||||
|
||||
if( a.ip[0] == 192 && a.ip[1] >= 168 )
|
||||
if( a.ip[0] == 192 && a.ip[1] == 168 )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user