mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: network: fix IPv4 private address checks according to RFC1918
Thanks to @Mr0maks for the fix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user